Start a docs site
Clone the docs site template, edit one config file, write MDX and deploy to Cloudflare.
This site is the docs site template
with its own config and content: TanStack Start, prerendered to static
files, served by a Cloudflare Worker, on
@voila.dev/docs and @voila.dev/ui-docs.
Clone the template
bunx degit voila-voila-dev/platform/domains/docs/templates/docs-site my-docs cd my-docsThe template is built and tested inside the platform monorepo: its README lists the three edits that take it out (the
workspace:^versions and the@voila.dev/sourcecondition). Thenbun install.Edit docs.config.ts
The site’s name and address, where the docs are served, the frontmatter vocabulary, the icons a page may name, the chrome’s words and the brand.
Write the pages
One
.mdxfile per page undersrc/content/docs, listed once insrc/content/docs/navigation.ts.bun run testfails on a dead link, a page the sidebar forgets, or one nothing links to.Deploy
bun run build bunx wrangler deploy
What this site adds
The package pages are not MDX files: src/docs/readme-pages.ts reads every
packages/*/README.md at build time and compiles it as Markdown, through a
remark plugin that drops its title and points its relative links to the
right page. A new package gets its page as soon as it has a README and a
place in the sidebar.