{"id":13700336,"url":"https://github.com/SivanLaai/vuepress-plugin-comment-plus","last_synced_at":"2025-05-04T18:34:59.935Z","repository":{"id":65519643,"uuid":"392163680","full_name":"SivanLaai/vuepress-plugin-comment-plus","owner":"SivanLaai","description":"Vuepress评论插件，当前支持Waline（推荐）、Gitalk、Valine，后续会增加更多，请关注。","archived":false,"fork":false,"pushed_at":"2021-08-03T03:54:55.000Z","size":27,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T13:18:57.731Z","etag":null,"topics":["blog","gitalk","valine","vuepress","vuepress-comment","vuepress-plugin","waline"],"latest_commit_sha":null,"homepage":"https://sivanlaai.github.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SivanLaai.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-03T02:38:38.000Z","updated_at":"2024-05-09T03:08:46.000Z","dependencies_parsed_at":"2023-01-27T02:10:29.852Z","dependency_job_id":null,"html_url":"https://github.com/SivanLaai/vuepress-plugin-comment-plus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SivanLaai%2Fvuepress-plugin-comment-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SivanLaai%2Fvuepress-plugin-comment-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SivanLaai%2Fvuepress-plugin-comment-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SivanLaai%2Fvuepress-plugin-comment-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SivanLaai","download_url":"https://codeload.github.com/SivanLaai/vuepress-plugin-comment-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252383176,"owners_count":21739285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","gitalk","valine","vuepress","vuepress-comment","vuepress-plugin","waline"],"created_at":"2024-08-02T20:00:54.416Z","updated_at":"2025-05-04T18:34:54.915Z","avatar_url":"https://github.com/SivanLaai.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Vuepress-comment-plugin-plus\n\n### Document - [English | [中文](./README.md)]\n\n[![](https://img.shields.io/npm/dm/vuepress-plugin-comment-plus.svg?style=flat-square)](https://www.npmjs.com/package/vuepress-plugin-comment-plus)\n[![](https://img.shields.io/badge/vuepress-≥v0.9.0-3eaf7c.svg?style=popout-square)](https://vuepress.vuejs.org/)\n![](https://img.shields.io/badge/license-MIT-blue.svg?style=popout-square)\n![version](https://img.shields.io/github/release/SivanLaai/vuepress-plugin-comment-plus.svg?style=flat-square)\n![visitors](https://visitor-badge.laobi.icu/badge?page_id=SivanLaai/vuepress-plugin-comment-plus)\n\n\n\u003e Support popluar comment plugins in Vuepress, sucn as Waline, Gitalk, Valine, Disqus.\n\n- base on [dongyuanxin/vuepress-plugin-comment](https://github.com/dongyuanxin/vuepress-plugin-comment)\n- [Features](#features)\n- [Usage](#usage)\n  - [Install](#install)\n  - [⚠️Route object properties](#⚠️Route-object-properties)\n  - [Use with Gitalk](#use-in-gitalk)\n  - [Use with Valine](#use-in-valine)\n  - [Use with Waline](#use-in-waline)\n  - [Hide comment](#how-to-hide-page-comment)\n- [Options detail](#options-detail)\n- [Todo](#todo)\n\n## Features\n\n- Support Waline\n- Support Gitalk, Valine\n- Dynamic Import\n- Response router change and refresh automatic\n- User can use passage's `$frontmatter`\n\n## Usage\n\n### Install\n\nWith `npm`:\n\n```bash\nnpm install --save vuepress-plugin-comment-plus\n```\n\nWith `yarn`:\n\n```bash\nyarn add vuepress-plugin-comment-plus -D\n```\n\nWith `cnpm`:\n\n```bash\ncnpm i --save vuepress-plugin-comment-plus\n```\n\n\n### ⚠️Route object properties\n\n**Don't use `window` object directly to get route information**.\n\nPlugin has registered correct route information in `frontmatter.to` object and `frontmatter.from` object. Their properties are the same as [vue-router's route object](https://router.vuejs.org/api/#route-object-properties).\n\n### Use in Waline\n\nThe `options` is exactly the same as `Waline` configuration.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      'vuepress-plugin-comment-plus',\n      {\n\t     choosen: 'waline', \n         // options选项中的所有参数，会传给Waline的配置\n         options: {\n           el: '#valine-vuepress-comment',\n           serverURL: 'your serverURL', //  such as \"https://***.vercel.app/\"\n\t       path: '\u003c%- frontmatter.commentid || frontmatter.permalink %\u003e'\n         }\n      }\n    ]\n  ]\n}\n```\n\n\n### Use in Gitalk\n\nThe `options` is exactly the same as `Gitalk` configuration.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      'vuepress-plugin-comment-plus',\n      {\n        choosen: 'gitalk', \n        options: {\n          clientID: 'GitHub Application Client ID',\n          clientSecret: 'GitHub Application Client Secret',\n          repo: 'GitHub repo',\n          owner: 'GitHub repo owner',\n          admin: ['GitHub repo owner and collaborators, only these guys can initialize github issues'],\n          distractionFreeMode: false \n        }\n      }\n    ]\n  ]\n}\n```\n\nIf you want to access variables, such as `$frontmatter` and `window`, please use **EJS** syntax.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      'vuepress-plugin-comment-plus',\n      {\n        choosen: 'gitalk', \n        options: {\n          id: '\u003c%- frontmatter.commentid || frontmatter.permalink %\u003e',\n          title: '「Comment」\u003c%- frontmatter.title %\u003e',\n          body: '\u003c%- frontmatter.title %\u003e：\u003c%-window.location.origin %\u003e\u003c%- frontmatter.to.path || window.location.pathname %\u003e',\n          clientID: 'GitHub Application Client ID',\n          clientSecret: 'GitHub Application Client Secret',\n          repo: 'GitHub repo',\n          owner: 'GitHub repo owner',\n          admin: ['GitHub repo owner and collaborators, only these guys can initialize github issues'],\n          distractionFreeMode: false,\n        }\n      }\n    ]\n  ]\n}\n```\n\n**Note**: Never use callback function in plugin configuration, that will be filtered by vuepress. So I have to support EJS syntax.\n\n### Use in Valine\n\nThe `options` is exactly the same as `Valine` configuration.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      'vuepress-plugin-comment-plus',\n      {\n        choosen: 'valine', \n        options: {\n          el: '#valine-vuepress-comment',\n          appId: 'Your own appId',\n          appKey: 'Your own appKey'\n        }\n      }\n    ]\n  ]\n}\n```\n\nIf you want to access variables, such as `$frontmatter` and `window`, please use **EJS** syntax.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    [\n      'vuepress-plugin-comment-plus',\n      {\n        choosen: 'valine', \n        options: {\n          el: '#valine-vuepress-comment',\n          appId: 'Your own appId',\n          appKey: 'Your own appKey',\n          path: '\u003c%- frontmatter.commentid || frontmatter.permalink %\u003e'\n        }\n      }\n    ]\n  ]\n}\n```\n\n\n### How to hide page comment\n\nIf you want to hide comment plugin in specified page, set `$frontmatter.comment` or `$frontmatter.comments` to `false`.\n\nFor example:\n\n```yml\n---\ncomment: false \n# comments: false \n---\n```\n\nComment won't appear in the page of this passage. \n\n## Options Detail\n\n- **choosen** `string`\n\n  **Required**.\n\n- **options** `object`\n\n  **Required**. The options of choosen comment plugin.\n\n- **container** `string`\n\n  **Optional, default as `'main.page'`**. The dom selector that contains choosen comment plugin.\n\n## Todo\n\n- Support Disqus\n- 中文说明\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSivanLaai%2Fvuepress-plugin-comment-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSivanLaai%2Fvuepress-plugin-comment-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSivanLaai%2Fvuepress-plugin-comment-plus/lists"}