@sumcai/vuepress-plugin-comment

1.0.2 • Public • Published

@sumcai/vuepress-comment-plugin

本项目修改自 Vuepress-comment-plugin 修正了无法使用valine进行文章阅读量统计的问题

Getting Started

npm install --save @sumcai/vuepress-plugin-comment

Usage

config plugin

module.exports = {
  plugins: [
    [
      '@sumcai/vuepress-plugin-comment',
      {
        choosen: 'valine',
        options: {
          el: '#valine-vuepress-comment',
          appId: 'Your own appId',
          appKey: 'Your own appKey',
          path: '<%- frontmatter.commentid || frontmatter.permalink %>',
          visitor: true
        }
      }
    ]
  ]
}

use in page.vue

For example:

<span :id="this.$frontmatter.permalink" class="leancloud_visitors" :data-flag-title="this.$frontmatter.title">
  <em class="post-meta-item-text">阅读量 </em>
  <i class="leancloud-visitors-count"></i>
</span>

Dependents (0)

Package Sidebar

Install

npm i @sumcai/vuepress-plugin-comment

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

6.99 kB

Total Files

6

Last publish

Collaborators

  • sumcai