cudoc-vitepress
v0.5.0
Published
VitePress Markdown integration for cudoc
Maintainers
Readme
cudoc-vitepress
Normalize actual VitePress Markdown-it tokens for cudoc syntax, document collection and embedding.
ESM · Node.js 20+
npm install @cudoment/cudoc cudoc-markdown-it cudoc-vitepressimport cudoc from "cudoc-vitepress"
// In VitePress markdown.config(md):
const markdown = {
config(md) {
md.use(cudoc, {
syntax: { headingAnchor: "both", callout: "both" },
})
},
}Import @cudoment/cudoc/styles.css in the theme entry. VitePress accepts .md, not React .mdx. createDocumentCompiler(md) reuses the configured renderer for collection and replacements. Embedding requires a collected library and prepared data. This adapter shares cudoc-markdown-it with cudoc-eleventy and does not use cudoc-remark.
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.
