feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build via Cloudflare Pages (#41)#181
Closed
ChrisonSimtian wants to merge 1 commit into
Closed
feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build via Cloudflare Pages (#41)#181ChrisonSimtian wants to merge 1 commit into
ChrisonSimtian wants to merge 1 commit into
Conversation
…ld via Cloudflare Pages Phase 1 of the documentation site migration (#41). Stands up Docusaurus 3.10 in /site/, configured to read from the existing ../docs/ tree as its content source — no fork of doc content, single source of truth. ## What's in this PR - **/site** — Docusaurus scaffold (TypeScript template) wired to: - read content from `../docs/` (path: '../docs') - serve at `/docs/*` (routeBasePath: '/docs') - render the Fallout homepage at `/` - target `https://docs.fallout.build` (production url) - **/site/src/theme/MDXComponents.tsx** — globally registers Tabs, TabItem, CodeBlock, and Admonition so existing docs don't need to add explicit imports. Mirrors the NUKE site's behaviour. - **/site/src/components/** — stub implementations of components the existing docs reference: AsciinemaPlayer (placeholder), DownloadButton, ControlKey, ToolConfirmation. Functional enough to build; visual polish is follow-up work. - **.github/workflows/docs-deploy.yml** — builds /site and deploys to Cloudflare Pages on push to main when site/** or docs/** change. - **.gitignore** — excludes site/node_modules, site/build, site/.docusaurus. - **docs/** — minimal touch-ups to make the source compile under MDX 3 strictly: - HTML comments `<!-- ... -->` → MDX comments `{/* ... */}` in 8 files. - Removed two `{#anchor}` explicit IDs in introduction.md (slugs auto-generate from headings). ## Architectural choices - **Same repo, /site folder.** docs/ is source-of-truth, /site is the builder. One PR cycle for both content and chrome. - **Cloudflare Pages for the docs subdomain.** GitHub Pages' single- site-per-repo limit means we can't also serve docs.fallout.build from this repo via GH Pages (fallout.build apex already lives there). Cloudflare Pages handles the subdomain via a CNAME on fallout.build DNS pointing to the Pages project. - **CD POC.** The deploy step (wrangler pages deploy) is the v13 CD reference point. The shape — build artifact, authenticated push to external system's API — is exactly what ADR-0001's "tasks → REST" pattern will eventually wrap. Kept minimal so it lifts cleanly into a Fallout primitive later. ## What's not in this PR - Custom favicon / logo (Docusaurus default placeholder retained). - Algolia DocSearch wiring (apply for OSS plan, follow-up PR). - Cleanup of the broken-link warnings (numbered-prefix paths like /docs/01-getting-started/01-installation vs Docusaurus's stripped /docs/getting-started/installation). onBrokenLinks: 'warn' means CI still passes; content cleanup tracked as follow-up. - Per-PR preview deploys. ## Manual setup needed (before deploy works) 1. Create Cloudflare Pages project named `fallout-docs` (one-time, via Cloudflare dashboard). 2. Add repo secrets: - `CLOUDFLARE_API_TOKEN` (Pages:Edit scope) - `CLOUDFLARE_ACCOUNT_ID` 3. Add DNS record on fallout.build: CNAME `docs` → `fallout-docs.pages.dev`. 4. In Cloudflare Pages project → Custom domains, add `docs.fallout.build`. ## Refs - #41 (P7 — Documentation site migration) - ADR-0001 (CD primitives — the deploy step is the v13 reference shape)
Owner
Author
|
Closing — wrong architecture. I assumed Cloudflare Pages would host the docs subdomain. The maintainer clarified that Cloudflare is DNS-only (wildcard `*.fallout.build` → GitHub Pages), and the GH Pages slot on this repo is taken by the apex. So a sibling `docs.fallout.build` site can't share this repo's GH Pages. Decision: docs site moves to a new `Falloutdocs` repo with its own GH Pages and `docs.fallout.build` as custom domain. Markdown source stays in this repo's `docs/` folder; Falloutdocs's deploy workflow checks out Fallout@main at build time. What carries forward
Tracking under #41 still. |
Merged
2 tasks
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
Phase 1 of the documentation site migration (#41). Stands up Docusaurus 3.10 in
/site/, reading from the existing../docs/tree (single source of truth, no fork). Deploys to docs.fallout.build via Cloudflare Pages.What's in this PR
/site/path: '../docs',routeBasePath: '/docs',url: 'https://docs.fallout.build'. Drops the placeholder blog./site/src/theme/MDXComponents.tsxTabs,TabItem,CodeBlock,Admonition— same pattern as NUKE's site, so docs don't need new imports./site/src/components/AsciinemaPlayer,DownloadButton,ControlKey,ToolConfirmation(referenced by existing docs). Functional, not polished..github/workflows/docs-deploy.ymlcloudflare/wrangler-action@v3. Triggers on push to main whensite/**ordocs/**change..gitignoresite/node_modules,site/build,site/.docusaurus.docs/(8 files)<!-- -->→{/* */}) and two{#anchor}IDs removed fromintroduction.md. Pure parser-compat changes; no rendered output changes.Why Cloudflare Pages, not GitHub Pages
GitHub Pages allows one site per repo, and
fallout.build(apex) already serves fromgh-pageson this repo. Cloudflare Pages handlesdocs.fallout.buildvia a CNAME on the fallout.build DNS pointing to the Pages project. Apex stays untouched.CD POC framing
The deploy step (
wrangler pages deploy site/build) is the v13 CD reference shape — build artifact, authenticated push to an external system's API. Exactly what ADR-0001's tasks → REST pattern targets. Kept minimal so it lifts cleanly into a Fallout primitive later ([CloudflarePagesDeploy]attribute,CloudflarePagesTasks.DeployPages(...)).Manual setup needed before the workflow can deploy
fallout-docs(one-time, Cloudflare dashboard).CLOUDFLARE_API_TOKEN(scope: Pages:Edit)CLOUDFLARE_ACCOUNT_IDfallout.build:CNAME docs → fallout-docs.pages.dev.docs.fallout.build.The workflow merges and runs immediately; first run will fail at the deploy step until 1+2 are done. That's fine — the site can be merged and the secrets added afterwards without rebasing.
What's deferred to follow-up PRs
onBrokenLinks: 'warn'(not 'throw') so CI passes. Many internal links use the source path (/docs/01-getting-started/01-installation) but Docusaurus serves the stripped path (/docs/getting-started/installation). Content-touch only.pull_requestwith preview branch arg).asciinema-player(cast files need to live somewhere accessible first).Test plan
cd site && npm install && npm run buildsucceeds locally (42 HTML files generated).index.html,404.html,docs/*,sitemap.xml.wrangler pages deploysucceeds.https://docs.fallout.build.Refs
🤖 Generated with Claude Code