插件配置

你可以通过 themePlugins 设置默认主题使用的插件。

默认主题使用了一些插件,如果你确实不需要该插件,你可以选择禁用它。在禁用插件之前,请确保你已了解它的用途。

import { defaultTheme } from '@vuepress/theme-default'

export default {
  theme: defaultTheme({
    themePlugins: {
      // 在这里自定义主题插件
    },
  }),
}

themePlugins.backToTop

  • 类型: BackToTopPluginOptions | boolean

  • 默认值: true

  • 详情:

    是否启用 @vuepress/plugin-back-to-top

    支持对象格式以作为插件选项。

themePlugins.container

themePlugins.copyCode

  • 类型: CopyCodePluginOptions | boolean

  • 默认值: true

  • 详情:

    是否启用 @vuepress/plugin-copy-code

    支持对象格式以作为插件选项。

themePlugins.externalLinkIcon

themePlugins.git

themePlugins.mediumZoom

themePlugins.nprogress

themePlugins.prismjs

themePlugins.seo

  • 类型: SeoPluginOptions | boolean

  • 默认值: true

  • 详情:

    是否启用 @vuepress/plugin-seo

    支持对象格式以作为插件选项。

themePlugins.sitemap

  • 类型: SitemapPluginOptions | boolean

  • 默认值: true

  • 详情:

    是否启用 @vuepress/plugin-sitemap

    支持对象格式以作为插件选项。