1.1.5 • Published 8 months ago

vuepress-plugin-blocktoggle v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

代码块折叠插件

安装

npm

npm i vuepress-plugin-blocktoggle -D

yarn

yarn add vuepress-plugin-blocktoggle -D

使用

// .vuepress/config.js

module.exports = {

//1. 引入iconfont样式
  head: [
    ['link', { rel: 'stylesheet', href: '//at.alicdn.com/t/font_3114978_qe0b39no76.css' }]
  ],

//2. 引入插件
  plugins: [
    'blocktoggle'
  ],

//3.开启行号
  markdown: {
    lineNumbers: true, // 显示代码块的行号
    extractHeaders: ["h2", "h3", "h4"], // 支持 h2、h3、h4 标题
  }
}

效果

image-20230905020053484

目前只适配了同系列的vuepress-plugin-copycodeblock,与其他复制插件位置有所冲突,如需要复制代码块,请使用此插件

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago