https://github.com/qdot/vuepress-markdown
Copy of @vuepress/markdown for importing over actual package
https://github.com/qdot/vuepress-markdown
Last synced: about 2 months ago
JSON representation
Copy of @vuepress/markdown for importing over actual package
- Host: GitHub
- URL: https://github.com/qdot/vuepress-markdown
- Owner: qdot
- Created: 2019-01-14T02:00:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T02:05:51.000Z (over 7 years ago)
- Last Synced: 2025-12-20T00:19:57.918Z (7 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @vuepress/markdown
> markdown library for vuepress
## Public API
### PLUGINS
A map [constant](./lib/constant.js) containing the names of all built-in markdown-it plugins.
### isRequiredPlugin(pluginName: string)
- **Usage**:
```js
const { isRequiredPlugin } = require('@vuepress/markdown')
console.log(isRequiredPlugin(PLUGINS.COMPONENT)) // true
console.log(isRequiredPlugin(PLUGINS.HIGHLIGHT_LINES)) // false
```
### removePlugin(config: chainMarkdown, pluginName: string)
Remove the specified built-in markdown-it plugin in VuePress.
It's needed to use with VuePress's [Plugin API > chainMarkdown](https://vuepress.vuejs.org/plugin/option-api.html#chainmarkdown).
- **Usage**:
```js
// Your VuePress Plugin or site config.
const { removePlugin } = require('@vuepress/markdown')
module.exports = {
chainMarkdown (config) {
removePlugin(config, PLUGINS.HIGHLIGHT_LINES)
}
}
```
> Note that `PLUGINS.COMPONENT` and `PLUGINS.ANCHOR` are required in VuePress, It is forbidden to delete them!
### removeAllBuiltInPlugins(config: chainMarkdown)
Remove all built-in but not 100% necessary markdown-it plugins in VuePress.
- **Usage**:
```js
// Your VuePress Plugin or site config.
module.exports = {
chainMarkdown (config) {
require('@vuepress/markdown').removeAllBuiltInPlugins(config)
}
}
```