vuepress-plugin-demo-container-v2

Vuepress plugin for demo block.
666 8
Install
npm install vuepress-plugin-demo-container-v2
Latest Version:2.3.4
License:MIT
Last Updated:Jul 19, 2023
Links: GitHub  ·  npm
Maintainer: waycowei

Introduction

中文 README

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:

yarn add vuepress-plugin-demo-container-v2 -D

Or npm:

npm i vuepress-plugin-demo-container-v2 -D

Usage

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

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

Write the following code in the Markdown file:

::: demo
```vue
<template>
  <div>
    <p>{{ message }}</p>
    <input v-model="message" placeholder="Input something..."/>
  </div>
</template>
<script>
  import { ref } from 'vue-demi'
  export default {
    setup () {
      const message = ref('Hello Here')

      return {
        message
      }
    }
  }
</script>
` ``
<!-- ignore space in the previous line -->
:::

View full documentation

Thanks

This project is heavily inspired by the md-loader of ElemeFE team.

Contributors

License

MIT License @2020-PRESENT Wayco Wei

Related Packages

vuepress-plugin-demo-container

Vuepress plugin for demo block.

3,850 119
vuepress-plugin-mermaidjs

A Vuepress plugin providing easy MermaidJS diagramming

40,239 75
vuepress-plugin-demo-code

📝 Demo and code plugin for vuepress

3,875 125
@vuepress-dumi/vuepress-plugin-dumi-previewer

A dumi style code previewer plugin for VuePress.

36,450 10
vuepress-plugin-vue-example

A Vuepress plugin to display Vue components' live examples and source code insid...

2,581 5

Version History

Version Released License
2.3.4 MIT
2.3.3 MIT
2.3.2 MIT
2.3.1 MIT
2.2.1 MIT