-
Notifications
You must be signed in to change notification settings - Fork 9
Migrate tutorials #1871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate tutorials #1871
Conversation
…610b29613f251543ab8a37d11c7d68020f41f9
- Create deploy-docs.yml workflow to build and deploy MyST docs - Trigger on main branch changes to tutorials/ directory - Configure MyST for docs.commontools.dev custom domain - Add CNAME file for GitHub Pages custom domain - Document build process in README_BUILD.md - Update MyST config with project metadata and base URL The workflow uses Node.js for MyST builds (separate from Deno codebase) and deploys static documentation to GitHub Pages automatically. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add migrate-tutorials branch to workflow triggers - Enable workflow for pull requests (build-only) - Restrict deployment to push events on main and migrate-tutorials - PRs will build but not deploy (validation only) This allows testing the deployment from the migration branch before merging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 issues found across 36 files
Prompt for AI agents (all 5 issues)
Understand the root cause of the following 5 issues and fix them.
<file name="tutorials/cts.md">
<violation number="1" location="tutorials/cts.md:9">
Typo: “succint” should be spelled “succinct.”</violation>
</file>
<file name="tutorials/state.md">
<violation number="1" location="tutorials/state.md:27">
This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with `});`.</violation>
</file>
<file name="tutorials/common_ui.md">
<violation number="1" location="tutorials/common_ui.md:266">
Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.</violation>
<violation number="2" location="tutorials/common_ui.md:310">
Fix the visual components list to refer to ct-kbd so readers use the correct element name.</violation>
</file>
<file name="tutorials/.nvmrc">
<violation number="1" location="tutorials/.nvmrc:1">
Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| keywords: commontools, recipes, cts, types | ||
| abstract: | | ||
| The CTS (Common Type System) helps automatically convert types and common | ||
| coding patterns for you. This leads to more readable and succint code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: “succint” should be spelled “succinct.”
Prompt for AI agents
Address the following comment on tutorials/cts.md at line 9:
<comment>Typo: “succint” should be spelled “succinct.”</comment>
<file context>
@@ -0,0 +1,15 @@
+keywords: commontools, recipes, cts, types
+abstract: |
+ The CTS (Common Type System) helps automatically convert types and common
+ coding patterns for you. This leads to more readable and succint code.
+ In this section, we will go over the basic features offered by CTS.
+---
</file context>
| coding patterns for you. This leads to more readable and succint code. | |
| coding patterns for you. This leads to more readable and succinct code. |
| ```{code-block} typescript | ||
| export default recipe("state test", () => { | ||
| const characterName = cell<string>(""); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with });.
Prompt for AI agents
Address the following comment on tutorials/state.md at line 27:
<comment>This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with `});`.</comment>
<file context>
@@ -0,0 +1,230 @@
+```{code-block} typescript
+export default recipe("state test", () => {
+ const characterName = cell<string>("");
+}
+```
+Here, we have created a cell with a type argument of `string`,
</file context>
| } | |
| }); |
| - gap: `ct-icon` (and `ct-label` has an optional in-built icon) | ||
| - gap: icon set? | ||
|
|
||
| - visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the visual components list to refer to ct-kbd so readers use the correct element name.
Prompt for AI agents
Address the following comment on tutorials/common_ui.md at line 310:
<comment>Fix the visual components list to refer to ct-kbd so readers use the correct element name.</comment>
<file context>
@@ -0,0 +1,365 @@
+- gap: `ct-icon` (and `ct-label` has an optional in-built icon)
+ - gap: icon set?
+
+- visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call`
+ - gap: `ct-img` or `ct-media`
+
</file context>
| - visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call` | |
| - visual: `ct-kbd`, `ct-separator`, `ct-table`, `ct-tool-call` |
|
|
||
| ```{code-block} html | ||
| <ct-screen> | ||
| <ct-toolbar slot="top"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.
Prompt for AI agents
Address the following comment on tutorials/common_ui.md at line 266:
<comment>Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.</comment>
<file context>
@@ -0,0 +1,365 @@
+
+```{code-block} html
+<ct-screen>
+ <ct-toolbar slot="top">
+ <ct-button>hello</ct-button>
+ </ct-toolbar>
</file context>
| <ct-toolbar slot="top"> | |
| <ct-toolbar slot="header"> |
| @@ -0,0 +1 @@ | |||
| 18 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.
Prompt for AI agents
Address the following comment on tutorials/.nvmrc at line 1:
<comment>Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.</comment>
<file context>
@@ -0,0 +1 @@
+18
</file context>
| 18 | |
| 20 |
- Add tutorials/ to fmt.exclude in deno.json - Format deploy-docs.yml to match Deno style guidelines - Ensures tutorials with different formatting rules don't break CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove migrate-tutorials branch from deployment triggers - Remove PR builds entirely - Only build and deploy when tutorials/ directory changes on main - Manual workflow dispatch still available for emergency deployments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary by cubic
Migrates the tutorials into this repo and sets up a MyST-powered docs site with automatic GitHub Pages deployment at docs.commontools.dev. Adds CI to build on pushes and PRs, plus local tooling for easy authoring.
New Features
Migration