1. vuepress-plugin-live
Make your markdown code examples come alive
vuepress-plugin-live
Package: vuepress-plugin-live
Created by: vue-styleguidist
Last modified: Mon, 23 May 2022 22:11:29 GMT
Version: 1.6.2
License: MIT
Downloads: 757
Repository: https://github.com/vue-styleguidist/vuepress-plugin-live

Install

npm install vuepress-plugin-live
yarn add vuepress-plugin-live

vuepress-plugin-live

Make your markdown code examples come alive using vue-live

Build Status
NPM Version NPM Downloads
semantic-release

Install

 yarn add -D vuepress-plugin-live
# or with npm:  npm install -D vuepress-plugin-live

Config

 //.vuepress/config.js
module.exports = {
  //...
  plugins: [["live"]],
};

Usage

In your markdown file just add a live flag to your fenced code blocks.

```vue live
<button>example</button>
```

Options

layout

Path to a custom layout for the vue-live instances

default

vuepress-plugin-live/layout.vue

example

 //.vuepress/config.js
module.exports = {
  //...
  plugins: [
    ["live", { layout: path.resolve(__dirname, "../VueLiveLayout.vue") }],
  ],
};

noSsr

Avoid server side rendering the components in components if they are not ssr ready. Remember that vuepress build pre-compiles the html pages you need.

default

false

example

 //.vuepress/config.js
module.exports = {
  //...
  plugins: [["live", { noSsr: true }]],
};

liveFilter

Allows users of theis plugin to say what fenced blocks will be rendered with vue-live.

default

 (lang) => / live$/.test(lang) && / live /.test(lang);

example

 //.vuepress/config.js
module.exports = {
  //...
  plugins: [
    [
      "live",
      {
        liveFilter(lang) {
          return ["vue", "js", "jsx"].includes(lang);
        },
      },
    ],
  ],
};

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin