feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build (#41)#190
Closed
ChrisonSimtian wants to merge 1 commit into
Closed
feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build (#41)#190ChrisonSimtian 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)
Collaborator
Author
|
Closing — this approach was superseded after the branch was last touched. The docs site is live at https://docs.fallout.build/, but via a different architecture:
Nothing in this PR belongs on
Branch will be deleted. Follow-ups on #41 tracked in new issues. |
4 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 #41 — Documentation site migration.
/site/, reading content from the existing../docs/tree (single source of truth — no fork).https://docs.fallout.buildvia Cloudflare Pages (GitHub Pages slot is held by the apexfallout.build)..github/workflows/docs-deploy.yml— builds and deploys on push to main whensite/**,docs/**, or the workflow itself changes.{#anchor}IDs).Full architectural notes — including why same-repo +
/sitefolder, why Cloudflare Pages, and how the deploy step is the v13 CD-POC reference for ADR-0001 — are in the commit body (d697b15).Manual setup required before the deploy job will succeed
The build half works on any push. The deploy half needs (one-time):
fallout-docs(Cloudflare dashboard).CLOUDFLARE_API_TOKEN(Pages:Edit),CLOUDFLARE_ACCOUNT_ID.fallout.build: CNAMEdocs→fallout-docs.pages.dev.docs.fallout.build.If we merge before these are wired up, the workflow will run on push to main and fail at the deploy step. Two options:
docs-deployrun, then wire Cloudflare and re-run.Explicit non-goals (follow-up PRs)
onBrokenLinks: 'warn'keeps CI green).Test plan
ubuntu-latest(the only PR-gating runner).cd site && npm ci && npm run buildsucceeds locally with the includedpackage-lock.json.docs-deployrun is green andhttps://docs.fallout.buildserves the site./renders;/docs/introductionresolves; navbar GitHub link works.Closes part of #41 (Phase 1). Done-when checklist on #41 stays open — search, link audit, README link are follow-up.