# 插件

# 富文本体验

安装 npm install -D vuepress-plugin-container

config.ts配置

module.exports = {
  plugins: [
    [
      'vuepress-plugin-container',
      {
        type: 'upgrade',
        before: info => `<UpgradePath title="${info}">`,
        after: '</UpgradePath>'
      }
    ]
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12

这是使用了富文本插件 vuepress-plugin-container【upgrade】的效果。

官方案例

官方案例查看: 自定义容器 (opens new window)

# 图片缩放效果

安装 npm install -D vuepress-plugin-medium-zoom

config.ts配置

module.exports = {
  plugins: [
    [
      'vuepress-plugin-medium-zoom',
      {
        selector: '.theme-default-content img:not(.no-medium-zoom)',
      },
    ]
  ]
}
1
2
3
4
5
6
7
8
9
10

点击图片:
演示

来源: zooming (opens new window)

# 右下角的猫

安装 npm install -D vuepress-plugin-cat

config.ts配置

module.exports = {
  plugins: [
    ['vuepress-plugin-cat']
  ]
}
1
2
3
4
5

来源:

Github (opens new window)

上次更新: 2023-4-21 5:53:13 ├F10: PM┤