Skip to content

Commit

Permalink
docs: readme of @vuepress/markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 13, 2018
1 parent 6a20c40 commit adb08a2
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions packages/@vuepress/markdown/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
# @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)
}
}
```

0 comments on commit adb08a2

Please sign in to comment.