docs: add Fumadocs documentation site on Cloudflare Workers#4
Merged
Conversation
Adds a Fumadocs + TanStack Start docs site under docs/, mounted at root (/), with sections for Getting started, Concepts, Guides, and API reference. Guides extract real wiring from each example app (node-elysia, spa-vite-dynamic, spa-vite-plugin, ssr-react-router, ssr-tanstack-start). Also: - Slim the package README to a pointer to the docs site. - Add `pnpm docs` to the root package.json and reference it in the root README. - Add version, CI, and changesets badges to the root README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch docs from a Pages config to the TanStack Start Workers preset: add @cloudflare/vite-plugin + wrangler as devDeps, wire the plugin in vite.config.ts, point wrangler.jsonc at the Start server entry, and add preview/deploy scripts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wire the "Copy/View as Markdown" buttons to actual content. The catch was that wrangler.jsonc pointed `main` at the TanStack Start package entry, so src/server.ts (which holds the .mdx -> /raw rewrites) was never bundled into the worker. Point main at src/server.ts and add an internal /raw/$ route that returns markdown via getLLMText. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI runs `tsc --noEmit` without a prior build, so `.source/{server,browser}.ts`
— the typed handles fumadocs-mdx writes from content/docs/ — don't exist
and the docs typecheck fails. Locally these were left over from previous
builds, which masked the issue. Add a postinstall step that runs the
`fumadocs-mdx` CLI to generate them after install.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/, with sections for Getting started, Concepts, Guides, and API reference. Guide content is extracted from the real wiring used in each example app (node-elysia, spa-vite-dynamic, spa-vite-plugin, ssr-react-router, ssr-tanstack-start).@cloudflare/vite-plugin+wrangler), withpreview/deployscripts and awrangler.jsoncpointing atsrc/server.ts./raw/$route returns raw markdown viagetLLMText, andsrc/server.tsrewrites/<slug>.mdx→/raw/<slug>.package/README.mddown to a pointer to the docs site, addpnpm docsto the root, and add version / CI / changesets badges to the root README.Test plan
pnpm docs build— built in ~1.2s, no errorspnpm docs preview— Workers preview serves the site on :4173/,/api-reference,/guides,/guides/node-loadconfig,/concepts/overview,/concepts/env-nameall render full content/<slug>.mdxreturns raw markdown (text/markdowncontent-type) for index, concepts, guides, and api-reference pages/llms.txtreturns the index with breadcrumbs;/llms-full.txtreturns 1098 lines of concatenated content/api/search?query=…returns highlighted JSON resultspnpm test:types— 7/7 packages passNote:
package/README.mdcurrently links tovlandoss-env-docs.pages.dev. The site now deploys to Workers, so this will need to be updated to the real deployed URL once this PR lands.🤖 Generated with Claude Code