Skip to content

一个基于 Vuepress2 的插件,它可以帮助你在编写文档的时候增加 Vue 示例,它的诞生初衷是为了降低编写组件文档时增加一些相关示例的难度。

License

Notifications You must be signed in to change notification settings

bobobabab/vuepress-plugin-template-code

Repository files navigation

vuepress-plugin-template-code

template-code plugin for vuepress.

With this plugin, you can both display template and code via following syntax.

::: demo
file path
:::

Features

  • 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

Install

$ npm i -D vuepress-plugin-template-code
# OR
$ pnpm i -D vuepress-plugin-template-code
# OR
$ yarn add -D vuepress-plugin-template-code

Usage

Write vuepress config

module.exports = {
  plugins: [
    "vuepress-plugin-template-code",
    {
      path: "./",
    },
  ],
};

Options

This plugin supports the following configurations.

License

MIT

Copyright (c) kola

Contributors ✨

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!

About

一个基于 Vuepress2 的插件,它可以帮助你在编写文档的时候增加 Vue 示例,它的诞生初衷是为了降低编写组件文档时增加一些相关示例的难度。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published