template-code plugin for vuepress.
With this plugin, you can both display template and code via following syntax.
::: demo
file path
:::
- Only one source code
- Foldable code
- Support online editing
- ✔ Codepen
- ✔ JSFiddle
- ✔ CodeSandbox
- Designed for long code
- Sticky fold button
- Auto scroll to top when you fold code
-
First of all, install vuepress v1.x
-
Then install the plugin
$ npm i -D vuepress-plugin-template-code
# OR
$ pnpm i -D vuepress-plugin-template-code
# OR
$ yarn add -D vuepress-plugin-template-code
Write vuepress config
module.exports = {
plugins: [
"vuepress-plugin-template-code",
{
path: "./",
},
],
};
This plugin supports the following configurations.
Copyright (c) kola
The plug-in reference vuepress-plugin-template-code Thanks goes to these wonderful people
This project follows the all-contributors specification. Contributions of any kind welcome!