JSPM

@sumcai/vuepress-plugin-comment

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q29134F
  • License MIT

Comment plugin in vuepress, such as Gitalk, Valine...

Package Exports

  • @sumcai/vuepress-plugin-comment
  • @sumcai/vuepress-plugin-comment/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sumcai/vuepress-plugin-comment) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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>