Public docs at packyard.dev/documentation. TanStack Start app that renders the markdown in content/ with Shiki syntax highlighting and a Pagefind static search index. Sibling repo to packyard (the product) and usepackyard/website (the marketing site).
-
Create
content/<slug>.mdwith frontmatter:--- title: My new page description: One sentence used for <meta description> and OG. order: 30 updated: 2026-04-27 ---
-
Add the slug to
src/lib/routes.tsso it shows up in the sidebar, sitemap, and prerender list. -
bun run devand verify it renders athttp://localhost:3001/documentation/<slug>.
bun install
bun run dev # http://localhost:3001/documentationThe dev server hot-reloads markdown edits.
bun run build # vite build → Nitro prerender → Pagefind indexThe build prerenders every doc URL into static HTML and runs Pagefind against .output/public/. The resulting index lives at .output/public/pagefind/. The Nitro server is what actually serves requests; static HTML is the prerender cache.
Production: packyard.dev/documentation/* is routed by Traefik to this container. See applications/packyard-docs/ in the k8s-production-cluster repo for the K8s manifests; the GitHub Action in this repo builds the image, pushes to GHCR, and bumps the digest on main.
Workspace dev: the parent usepackyard/ workspace's docker-compose.yml includes a docs service with the matching Traefik labels; make up from there brings everything (website + product + docs) up at once on packyard.test.
content/— markdown source. The only thing non-developers should ever need to edit.src/routes/documentation/$slug.tsx— splat route. Reads the matchingcontent/<slug>.mdserver-side.src/lib/markdown.server.ts— unified pipeline (server-only).src/lib/routes.ts— single source of truth for the slug list. Sidebar, sitemap, and prerender all consume it.src/lib/seo.ts— head/meta builder mirroring the marketing site so canonical/OG/Twitter tags stay consistent across both apps.src/components/— UI: brand-matched header/footer mirrored from the marketing site, plus DocsLayout / Sidebar / ToC / SearchBox.