cudoc-docusaurus
v0.5.0
Published
Docusaurus adapter for cudoc: remark wiring, default components and a theme that provides them.
Maintainers
Readme
cudoc-docusaurus
Connect cudoc to Docusaurus while retaining native heading IDs and TOC behavior.
ESM · Node.js 20+
npm install @cudoment/cudoc cudoc-remark cudoc-docusaurusimport { cudocRemarkPlugins } from "cudoc-docusaurus"
// In the Docusaurus docs plugin options:
const docs = {
beforeDefaultRemarkPlugins: cudocRemarkPlugins({
syntax: { headingAnchor: "both", callout: "both" },
}),
}Use markdown.format: "detect" for .md and .mdx. Import @cudoment/cudoc/styles.css from site CSS. The explicit syntax setup needs no cudoc theme plugin or component registration. For embedding, use the actual Docusaurus compiler during collection and add cudoc-remark/embed afterward in the rendering pipeline.
Choose host, cudoc or both independently for headingAnchor, badge, tableCellList, callout and link. The representative callout is > [!NOTE] Title. Authors do not register cudoc React components in the recommended setup. Syntax-only rendering needs no stored JSON; cross-document embedding requires document collection.
