Repository navigation
cudoc-docusaurus 1.1.0: reuse Markdown sections and export docs to PDF and Word #13040
cudoc-docusaurus 1.1.0 adds section reuse and Markdown extensions to Docusaurus, with optional HTML, PDF and Word export from the same documents.
I maintain cudoc. Following the invitation on the earlier resources PR, I am sharing it here.
What it adds
Authors write ordinary Markdown without importing React components:
- Reuse another document or one section by its heading. The source remains a regular page with its own URL.
- Extend Markdown with merged cells and cell lists. Add titled callouts, tabs and annotated code blocks.
- Check broken references across the collected documents. Optionally export that collection as HTML, PDF or Word.
For example, a page can reuse the limits section from reference.md:
```cudoc-embed sources: [reference.md#limits] ```
The copy resolves at build time. Editing the source and recollecting updates its embedded copies.
Try it
The adapter is tested with Docusaurus 3.10.2 and requires Node.js 22.12 or later:
npm install @cudoment/cudoc@1.1.0 cudoc-remark@1.1.0 cudoc-docusaurus@1.1.0
The Docusaurus guide separates the syntax-only setup from the collection step needed for embedding. It also shows the loader that refreshes cached pages after recollection. Export is optional and uses a separate cudoc-export package.
Links
These examples show the input and output:
- Docusaurus Markdown demo
- Demo Markdown source
- PDF handbook and Word handbook
- Source repository, npm package and release notes
Version 1.1.0 improves mobile export navigation and link visibility, and preserves user JavaScript when exporting self-contained HTML. The Docusaurus site keeps its own theme.
I would welcome feedback on the Docusaurus setup, section reuse and integration with existing documentation.