Skip to content

Navigation Menu

Sign up

manuscrio-pdf: export a built Docusaurus site to PDF manuals, plus llms.txt #13101

david-manm started this conversation in Plugins, Themes, Presets and Libs
Discussion options

I make this, so to be upfront: Manuscrio is commercial, self-hosted software. It runs without a licence in an evaluation mode that watermarks the PDFs, and the llms command described below is free. Following the suggestion on [#12643](#12643), I'm sharing it here.

manuscrio-pdf reads the build directory that docusaurus build produces and turns it into PDF manuals. It doesn't need a plugin in your site, access to your source, or a running server.

npx manuscrio-pdf inspect ./build # list the manuals this build contains
npx manuscrio-pdf export ./build # one PDF per version and locale

It runs in a container, so you need Docker or Podman. The npm command just starts the container for you.

What it does with a Docusaurus build

  • Versions, locales and plugin instances. Each combination becomes its own manual, so a site with two versions in three languages gives six PDFs and never mixes them.
  • Navbar sections. --scope section gives one PDF per documentation navbar entry, for example a short API volume separate from a long Docs one. --scope sidebar-root splits further, by sidebar.
  • Your logo. The navbar logo goes on the cover and in the running header of every page, with nothing to configure.
  • Content. Tabs, admonitions, <details>, code and math are all in the built HTML and come through. --hydrate runs the site's own scripts first, so @docusaurus/theme-mermaid diagrams and <BrowserOnly> content reach the PDF too.
  • Checks. Content clipped off the page fails the export instead of shipping quietly.
  • Navigation. The PDF has numbered chapters, a contents table and bookmarks.

llms.txt from the same build (free)

npx manuscrio-pdf llms ./build --edition default:en:current

This writes llms.txt in sidebar order, llms-full.txt, and a Markdown copy beside every page, ready to copy into build/ before you deploy. It reads the pages as built, so partials and generated index pages are included, and every tab is kept under its label. It also puts theme-mermaid diagrams back as mermaid code blocks, recovered from the compiled MDX. It needs no licence and adds no watermark or attribution.

Try it

Licensing

Evaluation mode needs no account and has no page limit; the PDFs carry a watermark and a footer line. An organization licence removes both. Licences are checked offline, so nothing calls home, and CI works without network access. Projects that are public under an OSI-approved licence, documentation included, can get an Open Source License at no cost.

Questions and bug reports welcome here.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /