The Fumadocs-powered docs for @variablelab/env, published at lab.variable.land/env/docs.
Built with TanStack Start + Fumadocs + Tailwind v4, deployed to Cloudflare Workers via Wrangler.
| Path | Purpose |
|---|---|
content/docs/ |
MDX content — getting-started/, concepts/, guides/, api-reference/ |
src/routes/ |
TanStack Router routes — docs viewer, llms.txt / llms-full.txt endpoints |
src/components/ |
MDX overrides, the page actions, env's Sign, the Signature, the Zod icon |
src/lib/ |
Fumadocs source adapter (source.ts), shared layout, llms-text builder |
src/server.ts |
Workers entry — wraps the TanStack Start handler; rewrites *.mdx and Accept: text/markdown requests to the /raw/* route |
public/ |
Static assets — fonts, favicons and app icons drawn from the Sign, manifest |
source.config.ts |
Fumadocs MDX config (Shiki themes, processed-markdown for /llms-full.txt) |
wrangler.jsonc |
Cloudflare Workers config — main and the lab.variable.land/env/* route |
From the repo root (after mise install && mise run setup — see development.md):
mise run docsite # alias for `pnpm --filter=docsite dev`Or directly inside this workspace:
pnpm dev # local dev server
pnpm build # production build (Vite + Cloudflare adapter)
pnpm preview # preview the built bundle
pnpm run deploy # build + wrangler deploydocsite/ lives in the small pnpm workspace alongside package/. It is not runtime-isolated like the examples/ — those each declare their own runtime via mise and use a packed tarball of @variablelab/env.
Workers Builds deploys the variablelab-env Worker on every merge to main; preview builds are off. Its settings live in the Cloudflare dashboard (Workers & Pages → variablelab-env → Settings → Build), not in this repo:
| Setting | Value |
|---|---|
| Root directory | /docsite |
| Build command | pnpm build |
| Deploy command | npx wrangler deploy (the default) |
| Build watch paths | docsite/**, pnpm-lock.yaml |
All commands run inside docsite/, so they use its pinned wrangler. pnpm run deploy is the manual equivalent.
postinstallrunsfumadocs-mdxto generate.source/(Fumadocs' MDX index). Commit-ignored.llms.txtandllms-full.txtare emitted fromsrc/routes/llms[.]txt.tsandsrc/routes/llms-full[.]txt.tsso LLM agents can ingest the full docs corpus.src/server.tsmakes raw MDX addressable two ways: append.mdxto any/docs/*URL, or sendAccept: text/markdown. Both are rewritten to the internal/raw/*route (TanStack Router can't express splat-plus-.mdxnatively, so the rewrite lives at the Worker edge).- The site lives under
/env/on lab.variable.land (pnpm dev/pnpm previewtoo); seebaseinvite.config.tsandsrc/lib/base-path.ts./envitself is env's Project page, served by Variable Lab's site.src/server.ts301s/env/and the root of the oldenv.oss.variable.landhost to it, and the old host's other paths under/env/.