0.0.1 • Published 2 years ago
vite-plugin-ddoc v0.0.1
vite-plugin-ddoc
Transform markdown into anything for vite plugin
Inspired by vitepress
Getting started
// vite config
import vitePluginTdoc from 'vite-plugin-ddoc';
export default {
plugins: [
vitePluginTdoc({
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.
0.0.1
2 years ago