Skip to content

justforuse/vuepress-plugin-markdown-define2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vuepress-plugin-markdown-define2

Define variables in markdown for Vuepress 2.

npm npm vuepress-next

Install

npm install vuepress-plugin-markdown-define2 -D

Usage

in config.js

const MdDefinePlugin = require('vuepress-plugin-markdown-define2')

const CONSTS = {
  __VERSION__: require('../../package.json').version
}

module.exports = {
  // ...
  plugins: [
    MdDefinePlugin(CONSTS)
  ]
}

Your .md file source code:

Current version is __VERSION__

will rendered as:

Current version is 1.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published