vuepress-plugin-live
Make your markdown code examples come alive
26,549
38
| Install | |
|---|---|
npm install vuepress-plugin-live |
|
| Latest Version: | 1.6.2 |
| License: | MIT |
| Last Updated: | Oct 29, 2024 |
| Links: | GitHub · npm |
Maintainer: elevatebart
vuepress-plugin-live
Make your markdown code examples come alive using vue-live
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.
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 Packages
Version History
| Version | Released | License |
|---|---|---|
| 1.6.2 | MIT | |
| 1.6.1 | MIT | |
| 1.6.0 | MIT | |
| 1.5.3 | MIT | |
| 1.5.2 | MIT | |
| 1.5.1 | MIT | |
| 1.5.0 | MIT | |
| 1.4.2 | MIT | |
| 1.4.1 | MIT | |
| 1.4.0 | MIT | |
| 1.3.0 | MIT | |
| 1.2.0 | MIT | |
| 1.1.0 | MIT | |
| 1.0.6 | MIT | |
| 1.0.5 | MIT | |
| 1.0.4 | MIT | |
| 1.0.3 | MIT | |
| 1.0.2 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT | |
| 0.2.0 | MIT | |
| 0.1.0 | MIT | |
| 0.0.8 | MIT | |
| 0.0.7 | MIT | |
| 0.0.6 | MIT | |
| 0.0.5 | MIT | |
| 0.0.4 | MIT | |
| 0.0.1 | MIT |