提交 adb08a21 编写于 作者: U ULIVZ

docs: readme of @vuepress/markdown

上级 6a20c40f
# @vuepress/markdown
> markdown for vuepress
> markdown library for vuepress
## Usage
## Public API
```javascript
const createMarkdown = require('@vuepress/markdown')
const md = createMarkdown(/* options */)
```
## Options
### PLUGINS
### slugify
A map [constant](./lib/constant.js) containing the names of all built-in markdown-it plugins.
- TODO
### isRequiredPlugin(pluginName: string)
### externalLinks
- **Usage**:
- TODO
```js
const { isRequiredPlugin } = require('@vuepress/markdown')
console.log(isRequiredPlugin(PLUGINS.COMPONENT)) // true
console.log(isRequiredPlugin(PLUGINS.HIGHLIGHT_LINES)) // false
```
### anchor
### removePlugin(config: chainMarkdown, pluginName: string)
- TODO
Remove the specified built-in markdown-it plugin in VuePress.
### toc
It's needed to use with VuePress's [Plugin API > chainMarkdown](https://vuepress.vuejs.org/plugin/option-api.html#chainmarkdown).
- TODO
- **Usage**:
### lineNumbers
```js
// You VuePress Plugin or site config.
const { removePlugin } = require('@vuepress/markdown')
module.exports = {
chainMarkdown (config) {
removePlugin(config, PLUGINS.HIGHLIGHT_LINES)
}
}
```
- TODO
> Note that `PLUGINS.COMPONENT` and `PLUGINS.ANCHOR` are required in VuePress, It is forbidden to delete them!
### beforeInstantiate
### removeAllBuiltInPlugins(config: chainMarkdown)
- TODO
Remove all built-in but not 100% necessary markdown-it plugins in VuePress.
### afterInstantiate
- **Usage**:
- TODO
```js
// You VuePress Plugin or site config.
module.exports = {
chainMarkdown (config) {
require('@vuepress/markdown').removeAllBuiltInPlugins(config)
}
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册