Skip to content

site: replace fumadocs with powderworks-docs - #32

Open
zmaril wants to merge 5 commits into
mainfrom
site-powderworks-docs-generator
Open

site: replace fumadocs with powderworks-docs#32
zmaril wants to merge 5 commits into
mainfrom
site-powderworks-docs-generator

Conversation

@zmaril

@zmaril zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Closes the era of rendering twenty-odd pages of markdown with a Next.js application.

What this is

cratebank.io's approach, grown into a multi-page generator: powderworks-docs (PowderworksCode/docs, replacing the @thepowderworks/fumadocs package entirely). A directory walk turns the content tree into pages and section indexes — every directory is a section whose index lists its children, breadcrumbs come from the path, and nothing runs in the browser.

The site

  • content/ holds the same 22 pages as plain .md with title / description / order frontmatter. Cards became link lists, Callouts became blockquotes.
  • Build emits: HTML pages, per-page markdown twins, sitemap.xml, llms.txt, 404.html, and a 27-line theme (system serif, six color tokens, automatic light/dark) copied beside every page.
  • Worker unchanged in spirit: Accept: text/markdown on /docs/* serves the twin beside each page.
  • Tests keep their teeth — rules-manifest suite now checks the new content paths; meta.json validation became frontmatter validation. 74 pass.

What's gone with the framework

Search, OG images, language tabs. The first can come back as a static index when it earns its complexity back; the others were adornment.

Verified

Build clean end-to-end on a machine with no special setup beyond bun install; wrangler dev serves HTML to browsers and markdown twins to agents (Vary: Accept, real 404s); straitjacket scans its own site clean (26 files).

🤖 Generated with Claude Code

The site was a Next.js application to render twenty-odd pages of
markdown. It is now markdown again, plus three hundred lines of
generator: every directory becomes a section index listing its
children, breadcrumbs come from the path, and nothing at all runs in
the browser.

- content/ holds the same twenty-two pages as plain .md with title,
  description, and order frontmatter; Cards became lists and Callouts
  became blockquotes in the conversion.
- The build calls powderworks-docs (github:PowderworksCode/docs) and
  emits HTML, per-page markdown twins, sitemap.xml, llms.txt, 404.html,
  and theme.css wherever a page needs it.
- The worker still negotiates: Accept: text/markdown on /docs paths
  now serves the twin sitting beside the page.
- Tests keep their teeth: the rules-manifest suite checks the new
  content paths against the scanner, and meta.json validation became
  frontmatter validation.

Search, OG images, and the language-tab component are gone with the
framework; the first can return as a static index when it earns its
complexity back.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
straitjacket 896bee9 Commit Preview URL

Branch Preview URL
Aug 22 2026, 10:59 PM

powderworks-docs now renders the whole content tree as a sticky
sidebar on non-landing pages, current page marked in the accent
color; the landing stays a single centered column.
@zmaril

zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Added the left-hand index list: the whole tree renders as a static sidebar on every page except the landing — current page marked, group headers for sections, collapses to a flat list on narrow screens. Still zero client JS; the highlight is baked in at build time. Refresh bun run dev to see it.

The shared generator now renders the index list on every page
including the landing, in the body serif with black text: bold group
headings, current page underlined, no separate nav palette. The docs'
About section is renamed Project so the tree no longer shows two
Abouts. Pages carry previous and next links that walk the same order
the sidebar shows.
@zmaril

zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Three changes from the look-over:

  • Sidebar everywhere: the landing shares the standard layout and is the first entry in the index list. Nesting de-confused — the docs' About section is now Project (Background & philosophy / Contributing / License), so the tree no longer shows two Abouts.
  • Fonts/colors: sidebar and breadcrumbs dropped the mono font and gray/rust palette; black body serif throughout, bold for group headings, current page underlined.
  • Prev/next: every page ends with links to its neighbors in exact sidebar order (e.g. Add Straitjacket to CI ↔ Suppress a false positive).

The landing carries the Wellcome Collection engraving again, centered
above the prose; strait-face.png sits beside the site name at the top
of the index list and serves as the favicon. The generator now emits
the page title as a single h1 on every page, so leaf pages have a
visible heading for the first time and the landing does not double
its own.
@zmaril

zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

All three:

  • Frontpage image: the Wellcome Collection engraving is back, centered above the intro.
  • Header icon: strait-face.png now sits beside "Straitjacket" at the top of the index list (and doubles as the favicon).
  • The h1 question: leaf pages never had a visible heading — their titles existed only in the tab, breadcrumbs, and sidebar — while the landing hand-rolled its own. The generator now emits exactly one <h1> per page from its title, so every page reads as a proper document.

The Introduction wrapper section is gone: guides, reference, and
getting-started are top-level, so the sidebar no longer buries them.
Project keeps philosophy, contributing, and license, and gains
Contact; Privacy is removed outright. The landing stops emitting the
auto-generated listing of every top-level page, which was the block
of four links at its foot.

Internal links move with the pages; the worker negotiates markdown
twins on any path now that twins sit beside everything.
@zmaril

zmaril commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Restructure from the look-over:

  • Flattened: How-to guides, Reference, Getting started are top-level — nothing nests under Introduction anymore (that page is gone; the landing carries what mattered).
  • Privacy removed. Contact moved into Project (Philosophy / Contributing / License / Contact).
  • Landing: the auto-generated list of four links at its foot is gone; it's a plain page now, sidebar included.

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