Converts dimer markdown AST node to Vue components
npm install dimer-tree-vue
Dimer is an open source project and CMS to help you publish your documentation online.
We believe every project/product is incomplete without documentation.
We want to help you publish user facing documentation, without worrying about tools or code to write.
[![travis-image]][travis-url]
[![npm-image]][npm-url]
If you are using Vue to create Dimer theme, then it will be best to use this low level component to convert all markdown AST nodes into HTML.
``shell
npm i dimer-tree-vue
Usage
After installation, import the module and use it as follows.`js
import * as dimerTree from 'dimer-tree-vue'
import Vue from 'vue'Vue.use(dimerTree)
// or with options
Vue.use(dimerTree, {
processFn: function (node, reRender, createElement) {
if (node.tag === 'img') {
return createElement('div', { class: 'image-container' }, reRender(node))
}
}
})
`Using the component
The plugin will register the component globally and can be used as follows.`vue
``The change log can be found in the CHANGELOG.md file.
Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.
MIT License, see the included MIT file.
[travis-image]: https://img.shields.io/travis/dimerapp/dimer-tree-vue/master.svg?style=flat-square&logo=travis
[travis-url]: https://travis-ci.org/dimerapp/dimer-tree-vue "travis"
[npm-image]: https://img.shields.io/npm/v/dimer-tree-vue.svg?style=flat-square&logo=npm
[npm-url]: https://npmjs.org/package/dimer-tree-vue "npm"