@vuepress/markdown
Advanced tools
Comparing version 1.0.0-alpha.20 to 1.0.0-alpha.21
{ | ||
"name": "@vuepress/markdown", | ||
"version": "1.0.0-alpha.20", | ||
"version": "1.0.0-alpha.21", | ||
"description": "markdown for vuepress", | ||
"main": "lib/index.js", | ||
"main": "index.js", | ||
"publishConfig": { | ||
@@ -21,3 +21,3 @@ "access": "public" | ||
"dependencies": { | ||
"@vuepress/shared-utils": "^1.0.0-alpha.20", | ||
"@vuepress/shared-utils": "^1.0.0-alpha.21", | ||
"markdown-it": "^8.4.1", | ||
@@ -24,0 +24,0 @@ "markdown-it-anchor": "^5.0.2", |
# @vuepress/markdown | ||
> markdown for vuepress | ||
> markdown library for vuepress | ||
## Usage | ||
## Public API | ||
```javascript | ||
const createMarkdown = require('@vuepress/markdown') | ||
const md = createMarkdown(/* options */) | ||
``` | ||
### PLUGINS | ||
## Options | ||
A map [constant](./lib/constant.js) containing the names of all built-in markdown-it plugins. | ||
### slugify | ||
### isRequiredPlugin(pluginName: string) | ||
- TODO | ||
- **Usage**: | ||
### externalLinks | ||
```js | ||
const { isRequiredPlugin } = require('@vuepress/markdown') | ||
console.log(isRequiredPlugin(PLUGINS.COMPONENT)) // true | ||
console.log(isRequiredPlugin(PLUGINS.HIGHLIGHT_LINES)) // false | ||
``` | ||
- TODO | ||
### removePlugin(config: chainMarkdown, pluginName: string) | ||
### anchor | ||
Remove the specified built-in markdown-it plugin in VuePress. | ||
- TODO | ||
It's needed to use with VuePress's [Plugin API > chainMarkdown](https://vuepress.vuejs.org/plugin/option-api.html#chainmarkdown). | ||
### toc | ||
- **Usage**: | ||
- TODO | ||
```js | ||
// You VuePress Plugin or site config. | ||
const { removePlugin } = require('@vuepress/markdown') | ||
module.exports = { | ||
chainMarkdown (config) { | ||
removePlugin(config, PLUGINS.HIGHLIGHT_LINES) | ||
} | ||
} | ||
``` | ||
### lineNumbers | ||
> Note that `PLUGINS.COMPONENT` and `PLUGINS.ANCHOR` are required in VuePress, It is forbidden to delete them! | ||
- TODO | ||
### removeAllBuiltInPlugins(config: chainMarkdown) | ||
### beforeInstantiate | ||
Remove all built-in but not 100% necessary markdown-it plugins in VuePress. | ||
- TODO | ||
- **Usage**: | ||
### afterInstantiate | ||
- TODO | ||
```js | ||
// You VuePress Plugin or site config. | ||
module.exports = { | ||
chainMarkdown (config) { | ||
require('@vuepress/markdown').removeAllBuiltInPlugins(config) | ||
} | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18922
14
506
55