Docusaurus to PDF
Manuscrio reads a finished Docusaurus build directory and exports it to publication-ready PDF manuals. It needs no source access, no plugin in your site, and no running server:
manuscrio-pdf inspect ./build # what manuals does this site contain?manuscrio-pdf export ./build # one manual per documentation editionBoth commands run end to end in a public example repository: Working Docusaurus integration
on GitHub — manuscrio/docusaurus-pdf-export.
Any theme built on the standard theme-doc-* markup works — that is Docusaurus’s published theming
contract, not a heuristic. The framework is detected from the built pages, so the command names no
framework at all; --framework docusaurus skips detection when you are diagnosing an unusual build.
Docusaurus is the framework Manuscrio reads most deeply. It is the only one of the three that describes versions, plugin instances and navbar sections in its output, so it is the only one where all three manual scopes apply.
Export it in your Docusaurus pipeline
Section titled “Export it in your Docusaurus pipeline”Three steps after the step that already builds your site. Docusaurus writes ./build:
- run: npm ci && npm run build
- name: Export the docs to PDF
- uses: actions/upload-artifact@v7 with: name: manual path: manuscrio-output/*.pdfPin the version, as above: one manuscrio version resolves to exactly one image, so re-running an
old pipeline renders what it rendered the first time. There is nothing to install in your site and
no GitHub Action to add.
The complete workflow is in
manuscrio/docusaurus-pdf-export,
and Run in CI has the docker run form for runners without Node.
Editions: versions, locales and plugin instances
Section titled “Editions: versions, locales and plugin instances”An edition is one plugin instance, one locale, and one version. Docusaurus has all three concepts, so a site with two versions in three languages offers six editions, and Manuscrio exports each as its own manual rather than merging them:
default:en:currentdefault:en:3.1.1default:fr:current...Manual scopes never combine editions implicitly. A versioned site therefore produces a manual per version, which is usually what a documentation team delivering releases actually wants.
Sections: the navbar level only Docusaurus has
Section titled “Sections: the navbar level only Docusaurus has”A documentation section is a documentation-bearing navbar entry — Docs and API, say. Docusaurus
is the only supported framework with that level, so it is the only one where --scope section
works:
| Scope | Produces |
|---|---|
--scope edition | one manual per edition, sections as top-level chapters |
--scope section | one manual per navbar section |
--scope sidebar-root | one manual per sidebar root |
manuscrio-pdf export ./build --scope sectionOne Docusaurus edition can genuinely produce three different sets of manuals from the same build, which is the mechanism behind shipping a short API volume separately from a long Docs one.
A sidebar belonging to no navbar section is refused at edition and section scope and exports at
--scope sidebar-root; see
UNASSIGNED_DOCUMENTATION_SET.
Your logo, discovered from the build
Section titled “Your logo, discovered from the build”Manuscrio reads the site’s own logo from the Docusaurus navbar and puts it on the cover and in the
running header of every interior page. Nothing to configure — a Docusaurus export carries the
customer’s brand by default, where Starlight and MkDocs currently need
--logo.
Getting Started · garnet · 51 pagesContent drawn in the browser
Section titled “Content drawn in the browser”Some content is drawn by JavaScript after the page loads, so it is not in your build’s HTML and
does not reach the manual. In Docusaurus that means @docusaurus/theme-mermaid diagrams and
anything inside <BrowserOnly>.
Add --hydrate:
manuscrio-pdf export ./build --hydrate --output-dir ./manuscrio-outputIt is off by default because it runs your site’s own scripts, adds about a second per page, and does not produce byte-identical output between runs. Pages whose scripts fail to load are reported rather than exported without them.
Everything else needs nothing: tabs, admonitions, <details>, code and math are all in your build
already, as are diagrams rendered at build time.
A non-root baseUrl is detected automatically. Pass --base-path /docs only if that detection is
ever wrong.
Sidebar root IDs are stable
Section titled “Sidebar root IDs are stable”A Docusaurus sidebar root is identified by the route it points at, so its ID survives edits above it
in the sidebar. That makes a Docusaurus ID safe to name in a pipeline in a way the other two
frameworks’ positional IDs are not — though re-reading them from inspect is still the habit worth
having. See manual IDs and output file names.
Export your own Docusaurus build
Section titled “Export your own Docusaurus build”Run the two commands at the top of this page against your own ./build. Nothing is uploaded and
there is no account: without a licence the export is still the complete manual at production
rendering quality, with no page limit, carrying an evaluation watermark until a licence removes it.
- Run your first export — the short version, start to PDF
- See a complete 594-page sample — exported from the official Docusaurus documentation
- Ask about a licence — one documentation product, every version, locale, developer and CI runner; or an Open Source License at no cost for a public project
See also
Section titled “See also”- Working Docusaurus integration on GitHub —
manuscrio/docusaurus-pdf-export, a complete example project, its GitHub Actions export workflow, and the resulting downloadable PDFs - Supported frameworks — how the three compare
- Run your first export
- Inspect and export