Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/waycowei/vuepress-plugin-demo-container-v2

Vuepress plugin for demo block
https://github.com/waycowei/vuepress-plugin-demo-container-v2

container demo documentation documentation-tool vuejs2 vuepress vuepress-plugin

Last synced: 4 days ago
JSON representation

Vuepress plugin for demo block

Awesome Lists containing this project

README

        

# Introduction

[中文 README](https://github.com/waycowei/vuepress-plugin-demo-container-v2/blob/master/README.zh-CN.md)

`Demo Container V2` is a `Vuepress-based` plug-in, which can help you add `Vue` examples when writing documents.

It can help you:
1. Write an example to automatically generate component examples and code examples by the custom `::: demo` syntax;
2. Support the `import` syntax in code example;

# Install
Use `yarn`:
```bash
yarn add vuepress-plugin-demo-container-v2 -D
```
Or `npm`:
```bash
npm i vuepress-plugin-demo-container-v2 -D
```

# Usage
Open the `.vuepress/config.js` file, and then reference the plugin in the appropriate location:

```js
module.exports = {
plugins: ['demo-container-v2']
}
```

Write the following code in the Markdown file:

```html
::: demo
```vue


{{ message }}



import { ref } from 'vue-demi'
export default {
setup () {
const message = ref('Hello Here')

return {
message
}
}
}

` ``

:::
```

[View full documentation](https://waycowei.github.io/vuepress-plugin-demo-container-v2/zh/)

# Thanks
This project is heavily inspired by the [md-loader](https://github.com/element-plus/element-plus/tree/dev/website/md-loader) of ElemeFE team.

# Contributors








# License

[MIT License](https://github.com/waycowei/vuepress-plugin-demo-container-v2/blob/master/LICENSE) @2020-PRESENT [Wayco Wei](https://github.com/waycowei)