Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justforuse/vuepress-plugin-markdown-define2
https://github.com/justforuse/vuepress-plugin-markdown-define2
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/justforuse/vuepress-plugin-markdown-define2
- Owner: justforuse
- Created: 2022-07-09T10:17:51.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T14:47:20.000Z (over 2 years ago)
- Last Synced: 2024-10-28T12:39:12.785Z (18 days ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- 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.
[![npm](https://img.shields.io/npm/v/vuepress-plugin-markdown-define2.svg) ![npm](https://img.shields.io/npm/dm/vuepress-plugin-markdown-define2.svg)](https://www.npmjs.com/package/vuepress-plugin-markdown-define2)
[![vuepress-next](https://img.shields.io/badge/vuepress-2.x-brightgreen.svg)](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
```