File tree 1 file changed +36
-22
lines changed
packages/@vuepress/markdown
1 file changed +36
-22
lines changed Original file line number Diff line number Diff line change 1
1
# @vuepress/markdown
2
2
3
- > markdown for vuepress
3
+ > markdown library for vuepress
4
4
5
- ## Usage
5
+ ## Public API
6
6
7
- ``` javascript
8
- const createMarkdown = require (' @vuepress/markdown' )
9
- const md = createMarkdown (/* options */ )
10
- ```
11
-
12
- ## Options
7
+ ### PLUGINS
13
8
14
- ### slugify
9
+ A map [ constant ] ( ./lib/constant.js ) containing the names of all built-in markdown-it plugins.
15
10
16
- - TODO
11
+ ### isRequiredPlugin(pluginName: string)
17
12
18
- ### externalLinks
13
+ - ** Usage ** :
19
14
20
- - TODO
15
+ ``` js
16
+ const { isRequiredPlugin } = require (' @vuepress/markdown' )
17
+ console .log (isRequiredPlugin (PLUGINS .COMPONENT )) // true
18
+ console .log (isRequiredPlugin (PLUGINS .HIGHLIGHT_LINES )) // false
19
+ ```
21
20
22
- ### anchor
21
+ ### removePlugin(config: chainMarkdown, pluginName: string)
23
22
24
- - TODO
23
+ Remove the specified built-in markdown-it plugin in VuePress.
25
24
26
- ### toc
25
+ It's needed to use with VuePress's [ Plugin API > chainMarkdown ] ( https://vuepress.vuejs.org/plugin/option-api.html#chainmarkdown ) .
27
26
28
- - TODO
27
+ - ** Usage ** :
29
28
30
- ### lineNumbers
29
+ ``` js
30
+ // You VuePress Plugin or site config.
31
+ const { removePlugin } = require (' @vuepress/markdown' )
32
+ module .exports = {
33
+ chainMarkdown (config ) {
34
+ removePlugin (config, PLUGINS .HIGHLIGHT_LINES )
35
+ }
36
+ }
37
+ ```
31
38
32
- - TODO
39
+ > Note that ` PLUGINS.COMPONENT ` and ` PLUGINS.ANCHOR ` are required in VuePress, It is forbidden to delete them!
33
40
34
- ### beforeInstantiate
41
+ ### removeAllBuiltInPlugins(config: chainMarkdown)
35
42
36
- - TODO
43
+ Remove all built-in but not 100% necessary markdown-it plugins in VuePress.
37
44
38
- ### afterInstantiate
45
+ - ** Usage ** :
39
46
40
- - TODO
47
+ ``` js
48
+ // You VuePress Plugin or site config.
49
+ module .exports = {
50
+ chainMarkdown (config ) {
51
+ require (' @vuepress/markdown' ).removeAllBuiltInPlugins (config)
52
+ }
53
+ }
54
+ ```
You can’t perform that action at this time.
0 commit comments