I just shipped
@elcoosp/docs-toolkit@1.5.0 after unifying my entire Starlight post-build pipeline into a single Rust host (docs-pipeline-rs) across 14 documentation sites.
Here is how the numbers moved from the initial JS pipeline to v1.5.0:
- Largest site build (kod-docs, 214 pages): 30.25s -> 12.02s (-60%)
- Standard site build (flux-docs, 64 pages): 7.95s -> 3.51s (-56%)
- Post-build plugin pass (214 pages): ~2,050ms across 8 sequential JS passes -> 299ms in 1 parallel Rust pass (6.9x faster)
- Post-build plugin pass (64 pages): ~780ms -> 186ms (4.2x faster)
- Client JS bundle per site: ~5,830 KB -> 700-734 KB (-87.7%, saving ~71.5 MB across 14 sites)
- Static output size (kod-docs with 300 OG images): 132 MB -> 66.1 MB (-50%)
- Lockfile footprint: -119 npm packages dropped
What changed under the hood:
1. Replaced client-side mermaid and d2 bundles with build-time dual-theme SVGs via mermaid-rs-renderer (0 KB diagram JS shipped to the browser).
2. Replaced duplicate /zen-mode/ routes with a pure-CSS data-zen-mode="true" toggle (-52 redundant HTML routes on flux-docs).
3. Switched Takumi OG cards to webp (quality: 85) and ran astro:build:done producers and auditors in two Promise.all phases.
4. Built docs-pipeline-rs (rayon, jwalk, tl, lol_html, aho-corasick) so HTML and Markdown files are read and parsed once in parallel to drive Mermaid rendering, link previews, term glossary indexing, BM25 related pages, i18n parity checks, Diataxis linting, and llms.txt generation in a single native binary (57ms to 299ms across all 14 sites).
Repo: https://github.com/elcoosp/docs-toolkit
#rust #astro #starlight #webperf #buildtoolsGitHubGitHub - elcoosp/docs-toolkitContribute to elcoosp/docs-toolkit development by creating an account on GitHub.
commit d220d52