Skip to content
ZenithDocs
English

ZenithDocs

A static, lightweight and themeable documentation engine built on Astro and Lumos.

On this page

ZenithDocs turns a folder of Markdown and MDX files into a fast documentation site. Every page is prerendered to plain HTML and CSS, and JavaScript is only shipped for the few interactions that need it.

npx github:AymericChaverot/zenith-docs create my-docs

Features

Each one is documented on its own page, and used by this site.

Customization

Why ZenithDocs?

Big documentation frameworks come with a lot of features, and often a lot of JavaScript. ZenithDocs aims for the same authoring experience while shipping a site that is as light as a hand-written one.

  • Static by design: every page is plain HTML. The sidebar, table of contents, accordions and file trees work without JavaScript.
  • Familiar conventions: pages are ordered with meta.json files, following the same syntax as Fumadocs.
  • Themeable: styles are built on Lumos design tokens and CSS cascade layers, so your own CSS always wins.
  • Built on Astro 7: Markdown goes through the Rust-based Sätteri pipeline and code is highlighted at build time with Shiki.

JavaScript budget

Every script is inlined in the page, so none of them costs an extra request. Sizes are measured on this site, compressed with gzip.

Feature JavaScript Size
Mobile menu None, thanks to the Popover API 0
Built with tooltip None, shown on hover and focus in CSS 0
Sidebar Remembers opened folders and the scroll position across pages 0.8 kB
Dark mode Applies the saved theme before the first paint, and the toggle 0.5 kB
Copy code button One click listener for every block 0.3 kB
Table of contents Highlights the sections in view, on pages that have one 1.1 kB
Search dialog Opens the dialog and renders results 1.1 kB
Tabs A web component, only on pages that use tabs 0.9 kB
API reference None beyond the tabs of the responses 0
Page transitions None: a crossfade in CSS, and links prerendered by the browser 0

That is about 4 kB on a page without tabs. Search is the only feature with a real cost, paid when a reader opens it: Pagefind and its worker, about 25 kB, then its WebAssembly module, about 70 kB, and the parts of the index that a query needs. Readers who never search never download any of it.

For the whole picture, the stylesheet weighs about 12 kB, and the default fonts about 140 kB for the three faces preloaded on every page, plus 38 kB for the code font on pages with code. Browsers that support speculation rules also prerender a page when the pointer rests on its link, which makes the click instant at the cost of downloading that page.

Last updated on