在VuePress中使用

目前,vuepress-plugin-comment 支持在 Vuepress 中使用 Valine,自动管理 SPA路由 相关的工作。

安装

如果使用 npm

npm install --save vuepress-plugin-comment

如果使用 yarn:

yarn add vuepress-plugin-comment -D

快速使用

vuepress-plugin-comment 添加到vuepress项目的插件配置中:

module.exports = {
  plugins: [
    [
      'vuepress-plugin-comment',
      {
        choosen: 'valine', 
        // options选项中的所有参数,会传给Valine的配置
        options: {
          el: '#valine-vuepress-comment',
          appId: 'Your own appId',
          appKey: 'Your own appKey'
        }
      }
    ]
  ]
}

进阶用法

© 2017 - 2024
Powered By xCss.