https://github.com/justforuse/vuepress-plugin-markdown-define2
https://github.com/justforuse/vuepress-plugin-markdown-define2
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/justforuse/vuepress-plugin-markdown-define2
- Owner: justforuse
- Created: 2022-07-09T10:17:51.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T14:47:20.000Z (over 3 years ago)
- Last Synced: 2025-05-11T04:11:14.260Z (10 months ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vuepress-plugin-markdown-define2
Define variables in markdown for Vuepress 2.
[ ](https://www.npmjs.com/package/vuepress-plugin-markdown-define2)
[](https://vuejs.org/)
## Install
```
npm install vuepress-plugin-markdown-define2 -D
```
## Usage
in `config.js`
```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:
```md
Current version is __VERSION__
```
will rendered as:
```md
Current version is 1.0.0
```