Skip to content

docs: add Fumadocs documentation site on Cloudflare Workers#4

Merged
rqbazan merged 6 commits into
mainfrom
docs/initial-site
May 13, 2026
Merged

docs: add Fumadocs documentation site on Cloudflare Workers#4
rqbazan merged 6 commits into
mainfrom
docs/initial-site

Conversation

@rqbazan

@rqbazan rqbazan commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a Fumadocs + TanStack Start docs site under 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).
  • Deploy the site to Cloudflare Workers via the TanStack Start Workers preset (@cloudflare/vite-plugin + wrangler), with preview/deploy scripts and a wrangler.jsonc pointing at src/server.ts.
  • Wire the "Copy / View as Markdown" page actions: an internal /raw/$ route returns raw markdown via getLLMText, and src/server.ts rewrites /<slug>.mdx/raw/<slug>.
  • Slim package/README.md down to a pointer to the docs site, add pnpm docs to the root, and add version / CI / changesets badges to the root README.

Test plan

  • pnpm docs build — built in ~1.2s, no errors
  • pnpm docs preview — Workers preview serves the site on :4173
  • /, /api-reference, /guides, /guides/node-loadconfig, /concepts/overview, /concepts/env-name all render full content
  • /<slug>.mdx returns raw markdown (text/markdown content-type) for index, concepts, guides, and api-reference pages
  • /llms.txt returns the index with breadcrumbs; /llms-full.txt returns 1098 lines of concatenated content
  • /api/search?query=… returns highlighted JSON results
  • pnpm test:types — 7/7 packages pass
  • README badges (npm, CI, changesets) — all 3 SVGs return HTTP 200

Note: package/README.md currently links to vlandoss-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

rqbazan and others added 6 commits May 13, 2026 17:42
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>
@rqbazan
rqbazan merged commit 4e05752 into main May 13, 2026
3 checks passed
@rqbazan
rqbazan deleted the docs/initial-site branch May 13, 2026 23:35
@vland-bot vland-bot Bot mentioned this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant