Documentation site
Documentation site
The Markdown in this directory is the source of truth for FlowDelta and FlexiPageDelta docs. The Astro Starlight project in docs-site/ loads it directly. It never copies or generates files under docs/.
The published site is at https://syntax-syllogism.com/flow-delta/docs/. Reading the same Markdown on GitHub works just as well.
Preview and build
Run the docs project from docs-site/:
cd docs-sitenpm cinpm run devThe docs site needs Node >=22.12.0, regardless of what the root project supports. Check your Node version first.
npm run build runs npm run build:site (scripts/build.mjs: the Astro build, which also writes llms.txt, then the docs-unchanged check), then npm test. Link validation happens during the Astro build. npm run preview serves a finished build. Output goes to docs-site/dist/, which Git ignores. The build fails if anything under docs/ changed. The test checks that README maps to the index, internal links are rewritten, pinned URLs pass through unchanged, and llms.txt matches the sidebar.
docs-site/astro.config.mjs takes the site URL, base path, and sidebar from docs-site/sidebar.mjs, and sets the shared theme. docs-site/src/content.config.ts loads ../docs and maps README.md to the site index. Keep both files thin. Shared Starlight behavior, theme styling, and Markdown link rewriting come from @syntax-syllogism/docs-theme. The shared favicon is committed as docs-site/public/ss-wordmark.svg, so fresh CI checkouts include it.
Sidebar and llms.txt
docs-site/sidebar.mjs is the only list of sidebar groups and pages. astro.config.mjs passes it to Starlight, and the shared theme builds llms.txt from Starlight’s sidebar, so the site navigation and the index can’t drift apart.
The shared theme (@syntax-syllogism/docs-theme 0.5 or later) writes dist/llms.txt during the Astro build (served at /flow-delta/docs/llms.txt). It follows the sidebar in order, with one link per page using its title and description frontmatter. index maps to the site root. The summary and intro come from the llmsTxt option in astro.config.mjs. The theme only warns when a page has no description, so test/docs-site.test.mjs fails the build instead; it also checks the heading, summary, intro, group headings, link order, link targets, and that each linked page was built.
Writing rules
- Every published page needs
titleanddescriptionfrontmatter. Thellms.txtindex uses both. - Add each new guide to both
docs/README.mdand the sidebar indocs-site/sidebar.mjs, so it can be found in the repo, on the site, and inllms.txt. - Link between files in this directory with relative
.mdlinks, anchors included. They work on GitHub, and the shared remark plugin rewrites them to site routes at build time. - Links that leave
docs/must be literal public GitHub blob URLs pinned to the current release tag, so they work from both GitHub and the site. The release CLI repoints them in the release commit. Don’t replace them with relative paths or branch URLs.
Publishing
.github/workflows/docs.yml calls the shared docs-publish workflow, and only for the release branch of the public Syntax-Syllogism/flow-delta repository. Pushes to the private repository skip the job. The reusable workflow builds this project and deploys only the generated flow-delta/docs/ subtree to Syntax-Syllogism/Syntax-Syllogism.github.io.
The release configuration’s docsLinkBase lets the release CLI keep source links consistent with the release tag. Build the docs locally before a release. A successful build of the root package doesn’t validate this separate project.