Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 1.06 KB

README.md

File metadata and controls

83 lines (58 loc) · 1.06 KB

vuepress-plugin-run-codeblock

Introduction

show and run codeblock in vuepress

Support

vuepress 1.x

Install

npm i vuepress-plugin-run-codeblock

Usage

step 1

in [..your vuepress project..]/docs/.vuepress/config.js

set:

...
plugins: [
  [require('vuepress-plugin-run-codeblock')],
],
...

step 2

use in markdowm

  • base
::: run
```js
console.log('js')
```
:::

1

you can click the button to run the code

2

  • show file name
::: run file/lib/index.js
```js
console.log('js')
```
:::

3

  • use in another container
:::: details Click me to view the code
::: run
```js
console.log('js')
```
:::
::::

4

see: markdown-it-container/issues

About

the api was supported by https://wandbox.org/