Skip to content

Migrate build system from mdbook to Eleventy#306

Open
wesbiggs wants to merge 2 commits into
mainfrom
feat/eleventy-migration
Open

Migrate build system from mdbook to Eleventy#306
wesbiggs wants to merge 2 commits into
mainfrom
feat/eleventy-migration

Conversation

@wesbiggs

Copy link
Copy Markdown
Member

Problem

mdbook build architecture is getting crusty and requires some heavy tooling.

Solution

replace mdbook with 11ty; rework templates to fit

Details

Replaces the Rust-based mdbook toolchain with a Node.js-only build using Eleventy 3.x, markdown-it, and linkinator. All 49 markdown source files and SUMMARY.md are unchanged; navigation is parsed from SUMMARY.md at build time.

  • Add .eleventy.js with markdown-it config, internal .md link rewriting, Nunjucks filters, and passthrough copies for fonts/CSS/JS assets
  • Add _data/nav.js: SUMMARY.md parser producing tree + flat nav structures
  • Add _includes/base.njk, page.njk, sidebar.njk with active/ancestor state
  • Add theme stubs (ayu-highlight.css, tomorrow-night.css) and self-hosted clipboard.min.js required by book.js
  • Trim book.js: remove Rust playground IIFE, keep hljs and clipboard logic
  • Rename localStorage keys from mdbook-* to dsnp-*
  • Update CI workflows to use npm ci + eleventy + linkinator; remove mdbook composite action and book.toml
  • Pin all package.json devDependencies to exact versions; bump engines to >=20

Testing

Build and browse. There should be no noticeable changes to the site vs. the published version at spec.dsnp.org.

Wes Biggs and others added 2 commits May 21, 2026 23:30
Replaces the Rust-based mdbook toolchain with a Node.js-only build using
Eleventy 3.x, markdown-it, and linkinator. All 49 markdown source files and
SUMMARY.md are unchanged; navigation is parsed from SUMMARY.md at build time.

- Add .eleventy.js with markdown-it config, internal .md link rewriting,
  Nunjucks filters, and passthrough copies for fonts/CSS/JS assets
- Add _data/nav.js: SUMMARY.md parser producing tree + flat nav structures
- Add _includes/base.njk, page.njk, sidebar.njk with active/ancestor state
- Add theme stubs (ayu-highlight.css, tomorrow-night.css) and self-hosted
  clipboard.min.js required by book.js
- Trim book.js: remove Rust playground IIFE, keep hljs and clipboard logic
- Rename localStorage keys from mdbook-* to dsnp-*
- Update CI workflows to use npm ci + eleventy + linkinator; remove mdbook
  composite action and book.toml
- Pin all package.json devDependencies to exact versions; bump engines to >=20

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop redundant `remark` dep (provided by remark-cli), remove stale
`files` field (non-existent src/ dir, no npm publish intent), and
delete unused tsconfig.json (no TypeScript in project).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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