Skip to content

docs(dogfood): rewrite the docs-kit docs site to cover the whole gem#44

Merged
mhenrixon merged 1 commit into
mainfrom
feature/dogfood-docs-rewrite
Jul 3, 2026
Merged

docs(dogfood): rewrite the docs-kit docs site to cover the whole gem#44
mhenrixon merged 1 commit into
mainfrom
feature/dogfood-docs-rewrite

Conversation

@mhenrixon

Copy link
Copy Markdown
Owner

What & why

The dogfood docs site had drifted badly behind the gem — epic #8 shipped Markdown islands, the API-docs kit, the .md twin, /llms.txt, search, MCP, --sync, and more, and almost none of it was documented. This rewrites and extends the site so it documents and demonstrates every capability, with each page dogfooding the gem (prose via md islands, DocsUI::Section/Code, and live component renders).

Builds on the bug-fix work in #43 (already merged) — the docs describe the now-fixed behavior.

Refs #8.

Registry + nav

app/models/doc.rb regrouped into 5 headings — Getting started / Authoring / Reference / AI & tooling / Deploy. nav_registries stays the canonical nav path (I verified a c.nav-lambda "promote groups to headings" approach would render empty subgroup summaries and kept the idiomatic path instead).

New pages

Page What it does (all live-rendered)
Markdown authoring /docs/markdown The md island, the single-quoted <<~'MD' convention + why, the full GFM vocabulary rendered live, and how markdown flows into the .md twin
API reference /docs/api Renders a live DocsUI::Endpoint + FieldTable + ErrorTable + RequestExample (4 client tabs) + JsonResponse, plus api_base_url/api_auth_header/api_clients
AI & agents /docs/ai The .md twin per page, the Markdown masthead action, /llms.txt + /llms-full.txt, the built-in MCP server, and the AGENTS.md + skill the generator scaffolds
Search /docs/search Server-rendered search + the ⌘K palette, search_* config, progressive enhancement

Rewrites

  • Configuration — the "All options" table is now complete: 28/28 knobs with defaults (was 13), grouped by concern; notes version_badge accepts a String or a callable; nav_registries canonical, c.nav the escape hatch.
  • Overview — a current "What you get" covering the whole surface, each feature linking to its page.
  • Installation — documents the --sync additive upgrade path.
  • Styling & CSS — adds c.code_theme / code_theme_dark / dark_themes, and corrects the theme-name description to the now-graceful degradation (not the old NameError crash — fixed in fix: 25 bugs found while dogfooding the docs site (crashes, .md export, search, config) #43).
  • Authoring — expanded building-blocks section links to the dedicated pages instead of duplicating them.

Verification

Rendered every page + .md twin + derived surface end-to-end:

  • All 14 registered pages → 200, no runtime errors (the "NameError"/"SyntaxError" strings that appear are documentation prose explaining error behavior, not runtime errors).
  • .md twins (/docs/api.md, /docs/markdown.md, /docs/ai.md), /llms.txt, /llms-full.txt, and /docs/search?q=… → all 200.
  • Docs pages lint clean under the docs app's omakase config.
  • Gem suite unaffected — 538 examples, 0 failures.

How it was built

A capability-map + coverage audit (the same run that found the #43 bugs) produced the page plan; the pages were then authored one-per-agent from the real gem API and each render-verified to 200. Agents caught and fixed several authoring footguns along the way (double-quoted heredocs interpolating #{…}, markdown links inside Callouts rendering literally).

https://claude.ai/code/session_01FPQb6z3YwcKRMbvoJhdxnX

The dogfood site had drifted badly behind the gem (epic #8 shipped Markdown
islands, the API-docs kit, the .md twin, llms.txt, search, MCP, --sync, and
more — none of it documented). Rewrite + extend so the site documents AND
demonstrates every capability, each page dogfooding the gem.

Registry + nav (app/models/doc.rb)
- Regrouped into 5 headings: Getting started / Authoring / Reference /
  AI & tooling / Deploy. nav_registries stays the canonical nav path.

New pages
- Markdown authoring (/docs/markdown) — the `md` island, the single-quoted
  heredoc convention, the GFM vocabulary rendered LIVE, how it flows into the
  .md twin.
- API reference (/docs/api) — renders a live DocsUI::Endpoint + FieldTable +
  ErrorTable + RequestExample (4 client tabs) + JsonResponse, plus the
  api_base_url/api_auth_header/api_clients config.
- AI & agents (/docs/ai) — the .md twin, the Markdown masthead action,
  /llms.txt + /llms-full.txt, the built-in MCP server, and the AGENTS.md +
  write-docs-page skill the generator scaffolds.
- Search (/docs/search) — server-rendered search + the ⌘K palette, the
  search_/search_path/search_shortcuts config, progressive enhancement.

Rewrites
- Configuration — the "All options" table is now COMPLETE (28/28 knobs with
  defaults, was 13), grouped by concern; notes version_badge accepts a String
  or callable; nav_registries canonical, c.nav the escape hatch.
- Overview — current "What you get" covering the whole surface, each feature
  linking to its page.
- Installation — documents the --sync additive upgrade path.
- Styling & CSS — adds c.code_theme / code_theme_dark / dark_themes (the
  light/dark Rouge highlight mechanism), corrected to describe the now-graceful
  theme-name degradation (not the old NameError crash).
- Authoring — expanded building-blocks section links to the dedicated pages.

Every page dogfoods the kit (md islands, DocsUI::Section/Code, live component
renders) and renders 200; the .md twin, /llms.txt, /llms-full.txt, and search
all render clean. Gem suite stays green (538 examples).

Refs #8

Claude-Session: https://claude.ai/code/session_01FPQb6z3YwcKRMbvoJhdxnX
@mhenrixon mhenrixon self-assigned this Jul 3, 2026
@mhenrixon mhenrixon added the documentation Improvements or additions to documentation label Jul 3, 2026
@mhenrixon mhenrixon merged commit 75584e2 into main Jul 3, 2026
4 checks passed
@mhenrixon mhenrixon deleted the feature/dogfood-docs-rewrite branch July 4, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant