JSPM

@vuepress/markdown

1.0.0-alpha.47
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 92405
  • Score
    100M100P100Q151231F
  • License MIT

markdown for vuepress

Package Exports

  • @vuepress/markdown
  • @vuepress/markdown/lib/lineNumbers

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vuepress/markdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@vuepress/markdown

markdown library for vuepress

Public API

PLUGINS

A map constant containing the names of all built-in markdown-it plugins.

isRequiredPlugin(pluginName: string)

  • Usage:
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.

  • Usage:
// 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:
// Your VuePress Plugin or site config.
module.exports = {
  chainMarkdown (config) {
    require('@vuepress/markdown').removeAllBuiltInPlugins(config)
  }
}