@youus/vite-plugin-doc
v1.0.1
Published
Transform markdown into anything for vite plugin
Downloads
4
Readme
vite-plugin-doc
Transform markdown into anything for vite plugin
How to use
yarn add @youus/vite-plugin-doc -D
Getting started
// vite config
import vitePluginDoc from '@youus/vite-plugin-doc';
export default {
plugins: [
vitePluginDoc({
markdown: {
container(md, container) {}, // markdown-it-container
attrs: {}, // markdown-it-attrs
anchor: {}, // markdown-it-anchor
toc: {}, // markdown-it-toc-done-right
config(md) {}, // custom md config
lineNumbers: false, // highlight lineNumber
},
plugins: [], // other plugins for vite
transforms: { // markdown transform progress
before({ source, file, md }) {}, // before transform
render({ source, file, md }) {}, // custom render or use default render
after({ result, source, file, md }) {} // after render or default render
}
})
]
}
License
MIT.