├── .editorconfig ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature-request-improvement.md │ ├── other.md │ └── question-help.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── default_plugin_config.js ├── dev ├── .vuepress │ └── config.js └── README.md ├── examples ├── images │ ├── alipay.jpeg │ ├── web.png │ ├── web_mini.png │ └── weixin.png └── index.html ├── index.js ├── libs ├── Gitalk.vue ├── clientRootMixin.js └── enhanceAppFile.js ├── package-lock.json ├── package.json └── styles └── gitalk-plus.styl /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: https://zhousiwei.gitee.io/ibooks/about/#%E6%89%93%E8%B5%8F 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | ## 🐥环境 & 设置 7 | 8 | **Node.js & npm version** 9 | 10 | ```bash 11 | 12 | ``` 13 | 14 | **Your browsers** (Optional) 15 | 16 | > The browser you use 17 | 18 | **Your OSes** (Optional) 19 | 20 | > what platforms (operating systems and devices) are affected? 21 | 22 | Your package.json `package.json`: 23 | 24 | ```json 25 | 26 | ``` 27 | 28 | ## For BUG 29 | 30 | 34 | 35 | ## ❓问题 36 | 37 | 38 | 39 | ## For feature request 40 | 41 | 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug修复 3 | about: Something isn't working as expected 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## ❓问题 11 | 12 | 13 | 14 | ## 🤔结果 & 预期 15 | 16 | Please describe what you expected to see.(请描述一下你希望看到什么) 17 | 18 | ## 🐥环境 & 设置 19 | 20 | **Node.js & npm version** 21 | 22 | ```bash 23 | ``` 24 | 25 | ## 🙋Others 26 | 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request-improvement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 功能要求/改进 3 | about: I have a feature request, suggestion, improvement etc... 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Feature Request 11 | 12 | 13 | 14 | ## 🙋Others 15 | 16 | 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 其他问题 3 | about: Not a question, feature-request, bug 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## ❓问题 11 | 12 | 13 | 14 | ## 🤔结果 & 预期 15 | 16 | Please describe what you expected to see.(请描述一下你希望看到什么) 17 | 18 | ## 🐥环境 & 设置 19 | 20 | **Node.js & npm version** 21 | 22 | ```bash 23 | ``` 24 | 25 | ## 🙋Others 26 | 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 问题/帮助 3 | about: I have a question, need help (e.g. Customize) 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## ❓问题 11 | 12 | 13 | 14 | ## 🤔结果 & 预期 15 | 16 | Please describe what you expected to see.(请描述一下你希望看到什么) 17 | 18 | ## 🐥环境 & 设置 19 | 20 | **Node.js & npm version** 21 | 22 | ```bash 23 | ``` 24 | 25 | ## 🙋Others 26 | 27 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | ## Description 6 | Please describe the change as necessary. 7 | If it's a feature or enhancement please be as detailed as possible. 8 | If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail. 9 | 10 | ## Specific Changes proposed 11 | Please list the specific changes involved in this pull request. 12 | 13 | ## Screenshots 14 | 15 | 16 | 17 | ## Pull request tasks 18 | 19 | - [ ] Add test cases for the changes. 20 | - [ ] Passed the CI test. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig 2 | 3 | # Created by https://www.gitignore.io/api/visualstudiocode,windows,node 4 | 5 | ### Node ### 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | /.settings/ 20 | target/ 21 | /logs/ 22 | /.svn/ 23 | *.class 24 | *.jar 25 | 26 | # Runtime data 27 | pids 28 | *.pid 29 | *.seed 30 | *.pid.lock 31 | 32 | # Directory for instrumented libs generated by jscoverage/JSCover 33 | lib-cov 34 | 35 | # Coverage directory used by tools like istanbul 36 | coverage 37 | 38 | # nyc test coverage 39 | .nyc_output 40 | 41 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 42 | .grunt 43 | 44 | # Bower dependency directory (https://bower.io/) 45 | bower_components 46 | 47 | # node-waf configuration 48 | .lock-wscript 49 | 50 | # Compiled binary addons (https://nodejs.org/api/addons.html) 51 | build/Release 52 | 53 | # Dependency directories 54 | node_modules/ 55 | jspm_packages/ 56 | 57 | # TypeScript v1 declaration files 58 | typings/ 59 | 60 | # Optional npm cache directory 61 | .npm 62 | 63 | # Optional eslint cache 64 | .eslintcache 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variables file 76 | .env 77 | 78 | # parcel-bundler cache (https://parceljs.org/) 79 | .cache 80 | 81 | # next.js build output 82 | .next 83 | 84 | # nuxt.js build output 85 | .nuxt 86 | 87 | # vuepress build output 88 | .vuepress/dist 89 | 90 | # Serverless directories 91 | .serverless 92 | 93 | ### VisualStudioCode ### 94 | .vscode/* 95 | !.vscode/settings.json 96 | !.vscode/tasks.json 97 | !.vscode/launch.json 98 | !.vscode/extensions.json 99 | 100 | ### Windows ### 101 | # Windows thumbnail cache files 102 | Thumbs.db 103 | ehthumbs.db 104 | ehthumbs_vista.db 105 | 106 | # Dump file 107 | *.stackdump 108 | 109 | # Folder config file 110 | [Dd]esktop.ini 111 | 112 | # Recycle Bin used on file shares 113 | $RECYCLE.BIN/ 114 | 115 | # Windows Installer files 116 | *.cab 117 | *.msi 118 | *.msix 119 | *.msm 120 | *.msp 121 | 122 | # Windows shortcuts 123 | *.lnk 124 | 125 | # End of https://www.gitignore.io/api/visualstudiocode,windows,node 126 | 127 | # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) 128 | .history 129 | .DS_Store 130 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | ts*.json 3 | .travis.yml 4 | .babelrc 5 | .eslint* 6 | rollup.config.js 7 | .github 8 | .editorconfig 9 | yarn.lock 10 | .history 11 | .DS_Store 12 | .build/ 13 | dev/ 14 | .temp/ 15 | .git* 16 | 17 | # Logs 18 | logs 19 | *.log 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | # Runtime data 25 | pids 26 | *.pid 27 | *.seed 28 | *.pid.lock 29 | 30 | # Directory for instrumented libs generated by jscoverage/JSCover 31 | lib-cov 32 | 33 | # Coverage directory used by tools like istanbul 34 | coverage 35 | 36 | # nyc test coverage 37 | .nyc_output 38 | 39 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 40 | .grunt 41 | 42 | # Bower dependency directory (https://bower.io/) 43 | bower_components 44 | 45 | # node-waf configuration 46 | .lock-wscript 47 | 48 | # Compiled binary addons (https://nodejs.org/api/addons.html) 49 | build/Release 50 | 51 | # Compiled files 52 | dist 53 | 54 | # Dependency directories 55 | node_modules/ 56 | jspm_packages/ 57 | 58 | # TypeScript v1 declaration files 59 | typings/ 60 | 61 | # Optional npm cache directory 62 | .npm 63 | 64 | # Optional eslint cache 65 | .eslintcache 66 | 67 | # Optional REPL history 68 | .node_repl_history 69 | 70 | # Output of 'npm pack' 71 | *.tgz 72 | 73 | # Yarn Integrity file 74 | .yarn-integrity 75 | 76 | # dotenv environment variables file 77 | .env 78 | 79 | # parcel-bundler cache (https://parceljs.org/) 80 | .cache 81 | 82 | # next.js build output 83 | .next 84 | 85 | # nuxt.js build output 86 | .nuxt 87 | 88 | # vuepress build output 89 | .vuepress/dist 90 | 91 | # Serverless directories 92 | .serverless 93 | 94 | # Test directory 95 | test 96 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 思伟 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vuepress-plugin-mygitalk 2 | 3 | ``` 4 | .___ ___. ____ ____ _______ __ .___________. ___ __ __ ___ 5 | | \/ | \ \ / / / _____|| | | | / \ | | | |/ / 6 | | \ / | \ \/ / | | __ | | `---| |----` / ^ \ | | | ' / 7 | | |\/| | \_ _/ | | |_ | | | | | / /_\ \ | | | < 8 | | | | | | | | |__| | | | | | / _____ \ | `----.| . \ 9 | |__| |__| |__| \______| |__| |__| /__/ \__\ |_______||__|\__\ 10 | ``` 11 | 12 | [![](https://nodei.co/npm/vuepress-plugin-mygitalk.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 13 | 14 | [![npm package](https://img.shields.io/npm/v/vuepress-plugin-mygitalk.svg?label=vuepress-plugin-mygitalk)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 15 | [![downloads-total](https://img.shields.io/npm/dt/vuepress-plugin-mygitalk.svg)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 16 | [![downloads-month](https://img.shields.io/npm/dm/vuepress-plugin-mygitalk.svg)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 17 | ![star](https://img.shields.io/github/stars/JoeyBling/vuepress-plugin-mygitalk "star") 18 | ![fork](https://img.shields.io/github/forks/JoeyBling/vuepress-plugin-mygitalk "fork") 19 | ![GitHub Last Commit](https://img.shields.io/github/last-commit/JoeyBling/vuepress-plugin-mygitalk.svg?label=commits "GitHub Last Commit") 20 | ![issues](https://img.shields.io/github/issues/JoeyBling/vuepress-plugin-mygitalk "issues") 21 | [![Author](https://img.shields.io/badge/Author-JoeyBling-red.svg "Author")](https://zhousiwei.gitee.io "Author") 22 | [![VuePress Version](https://img.shields.io/badge/VuePress-%3E%3D%201.0.0-blue.svg)](https://v1.vuepress.vuejs.org/zh/) 23 | [![vuepress-theme-yilia-plus](https://img.shields.io/badge/Theme-Yilia_Plus-red.svg "vuepress-theme-yilia-plus")](https://github.com/JoeyBling/vuepress-theme-yilia-plus) 24 | [![博客搭建交流群](https://img.shields.io/badge/QQ群-422625065-red.svg "博客搭建交流群")](https://jq.qq.com/?_wv=1027&k=58Ypj9z "博客搭建交流群") 25 | 26 | ------------------ 27 | 28 | > **欢迎使用和Star支持,如使用过程中碰到问题,可以提出[Issue](https://github.com/JoeyBling/vuepress-plugin-mygitalk/issues),我会尽力完善** 29 | 30 | ## 介绍 31 |     **VuePress集成[Gitalk](https://github.com/gitalk/gitalk). | [Gitalk](https://github.com/gitalk/gitalk) plugin for VuePress.** 32 | 33 | - 功能还很少,欢迎各位给我提意见和建议~ 34 | - [vuepress-plugin-mygitalk](https://github.com/JoeyBling/vuepress-plugin-mygitalk) 是为 [VuePress](https://v1.vuepress.vuejs.org/zh/) `1.0.0+`制作的插件。 35 | - [Gitalk文档](https://github.com/gitalk/gitalk/blob/master/readme-cn.md#%E8%AE%BE%E7%BD%AE) 36 | - 关于申请并配置第三方应用请查看 ➡️ [https://www.jianshu.com/p/ac7658cc912f](https://www.jianshu.com/p/ac7658cc912f) 37 | 38 | ## 线上预览 39 | 40 | > **预览 ➡️ [https://zhousiwei.gitee.io/ibooks](https://zhousiwei.gitee.io/ibooks)** 41 | 42 | ## 推荐一款VuePress主题 43 | > **一款简洁优雅的VuePress主题 ➡️ [https://github.com/JoeyBling/vuepress-theme-yilia-plus](https://github.com/JoeyBling/vuepress-theme-yilia-plus)** 44 | 45 | ## 效果截图 46 | 47 | ![截图](./examples/images/web_mini.png) 48 | 49 | ## 安装 50 | 51 | ```bash 52 | yarn add vuepress-plugin-mygitalk 53 | # or 54 | npm install vuepress-plugin-mygitalk --save 55 | ``` 56 | 57 | ------------ 58 | 59 | ## 开始使用 60 | 61 | ### 引入该插件 62 | 63 | 在配置文件中引入 `vuepress-plugin-mygitalk` 64 | 65 | > 查看 [官方文档](https://v1.vuepress.vuejs.org/zh/plugin/using-a-plugin.html)。 66 | 67 | ```javascript 68 | module.exports = { 69 | plugins: [ 70 | [ 71 | 'vuepress-plugin-mygitalk' 72 | ], 73 | ], 74 | } 75 | ``` 76 | 77 | ### 插件配置 78 | 79 | ```javascript 80 | module.exports = { 81 | plugins: [ 82 | [ 83 | 'vuepress-plugin-mygitalk', { 84 | // 是否启用(关闭请设置为false)(default: true) 85 | enable: true, 86 | // 是否开启首页评论(default: true)。是否为首页是通过frontmatter中名为home的配置项来识别的,而非路由 87 | home: true, 88 | // Gitalk配置 89 | gitalk: { 90 | // GitHub Application Client ID. 91 | clientID: '', 92 | // GitHub Application Client Secret. 93 | clientSecret: '', 94 | // GitHub repository. 存储评论的 repo 95 | repo: '', 96 | // GitHub repository 所有者,可以是个人或者组织。 97 | owner: '', 98 | // GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。(不配置默认是owner配置) 99 | admin: [''], 100 | // 设置语言(default: zh-CN) 101 | language: 'zh-CN', 102 | } 103 | } 104 | ], 105 | ], 106 | } 107 | ``` 108 | 109 | ## 其他项目支持 110 | 111 | - ### 一款简洁优雅的hexo主题:[hexo-theme-yilia-plus](https://github.com/JoeyBling/hexo-theme-yilia-plus) 112 | - ### 一款简洁优雅的VuePress主题:[vuepress-theme-yilia-plus](https://github.com/JoeyBling/vuepress-theme-yilia-plus) 113 | - ### VuePress集成Live2D看板娘:[vuepress-plugin-helper-live2d](https://github.com/JoeyBling/vuepress-plugin-helper-live2d) 114 | - ### VuePress集成Gitalk:[vuepress-plugin-mygitalk](https://github.com/JoeyBling/vuepress-plugin-mygitalk) 115 | - ### VuePress回到页首插件Plus:[vuepress-plugin-gotop-plus](https://github.com/JoeyBling/vuepress-plugin-gotop-plus) 116 | 117 | ## 捐赠 118 |     **如果感觉对您有帮助,请作者喝杯咖啡吧,请注明您的名字或者昵称,方便作者感谢o(* ̄︶ ̄*)o** 119 | 120 | | 微信 | 支付宝 | 121 | | :---: | :---: | 122 | | ![](./examples/images/weixin.png) | ![](./examples/images/alipay.jpeg) | 123 | 124 | ## 关于我 125 | - [个人博客](https://zhousiwei.gitee.io/) 126 | - [技术笔记](https://zhousiwei.gitee.io/ibooks/) 127 | - [GitHub](https://github.com/JoeyBling) 128 | - [码云](https://gitee.com/zhousiwei) 129 | - [简书](https://www.jianshu.com/u/02cbf31a043a) 130 | - [CSDN](https://blog.csdn.net/qq_30930805) 131 | - [知乎](https://www.zhihu.com/people/joeybling) 132 | - [微博](http://weibo.com/jayinfo) 133 | - **主要涉及技术:`Java后端开发`、`聚合支付`、`公众号开发`、`开源爱好者`、`Linux`** 134 | 135 | ## LICENSE 136 | 137 | [![LICENSE](https://img.shields.io/github/license/JoeyBling/vuepress-plugin-mygitalk "LICENSE")](./LICENSE "LICENSE") -------------------------------------------------------------------------------- /default_plugin_config.js: -------------------------------------------------------------------------------- 1 | const config = require('./package.json'); 2 | 3 | /* 全局默认配置(插件定义的常量) */ 4 | module.exports = { 5 | // 全局开启是否打印控制台日志 6 | log: true, 7 | // 插件名称 8 | pluginName: config.name, 9 | // 是否启用(关闭请设置为false)(default: true) 10 | enable: true, 11 | 12 | // 默认插件配置(此处插件配置可更改) 13 | 14 | // 渲染的DOM元素id 15 | elementName: "my-gitalk-container", 16 | // 最大重试次数 17 | maxRetryCount: 5, 18 | // 500毫秒执行一次check 19 | defaultCheckMinutes: 500, 20 | // 是否开启首页评论 21 | home: true, 22 | // Gitalk配置 23 | gitalk: { 24 | // clientID: '', 25 | // // come from github development 26 | // clientSecret: '', 27 | // repo: '', 28 | // owner: '', 29 | // admin: [], 30 | language: 'zh-CN', 31 | }, 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /dev/.vuepress/config.js: -------------------------------------------------------------------------------- 1 | // .vuepress/config.js 2 | module.exports = { 3 | /* 使用插件 */ 4 | plugins: [ 5 | [ 6 | require('../../vuepress-plugin-mygitalk/index'), { 7 | // 是否启用(关闭请设置为false)(default: true) 8 | enable: true, 9 | // 日志启用(调试用)(default: true) 10 | log: true, 11 | // 是否开启首页评论(default: true) 12 | home: true, 13 | // Gitalk配置 14 | gitalk: { 15 | // GitHub Application Client ID. 16 | clientID: '071b084546d9f5bd6306', 17 | // GitHub Application Client Secret. 18 | clientSecret: 'a19c22f6b78dd87a731a192afca81cf63e57c5d5', 19 | // GitHub repository. 存储评论的 repo 20 | repo: 'ibooks', 21 | // GitHub repository 所有者,可以是个人或者组织。 22 | owner: 'JoeyBling', 23 | // GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。 24 | admin: ['JoeyBling'], 25 | // 设置语言(default: zh-CN) 26 | language: 'zh-CN', 27 | } 28 | } 29 | ], 30 | ], 31 | themeConfig: { 32 | nav: [{ 33 | text: 'Home', 34 | link: '/' 35 | }], 36 | }, 37 | } 38 | -------------------------------------------------------------------------------- /dev/README.md: -------------------------------------------------------------------------------- 1 | # vuepress-plugin-mygitalk 2 | 3 | ``` 4 | .___ ___. ____ ____ _______ __ .___________. ___ __ __ ___ 5 | | \/ | \ \ / / / _____|| | | | / \ | | | |/ / 6 | | \ / | \ \/ / | | __ | | `---| |----` / ^ \ | | | ' / 7 | | |\/| | \_ _/ | | |_ | | | | | / /_\ \ | | | < 8 | | | | | | | | |__| | | | | | / _____ \ | `----.| . \ 9 | |__| |__| |__| \______| |__| |__| /__/ \__\ |_______||__|\__\ 10 | ``` 11 | 12 | [![](https://nodei.co/npm/vuepress-plugin-mygitalk.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 13 | 14 | [![npm package](https://img.shields.io/npm/v/vuepress-plugin-mygitalk.svg?label=vuepress-plugin-mygitalk)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 15 | [![downloads-total](https://img.shields.io/npm/dt/vuepress-plugin-mygitalk.svg)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 16 | [![downloads-month](https://img.shields.io/npm/dm/vuepress-plugin-mygitalk.svg)](https://www.npmjs.com/package/vuepress-plugin-mygitalk) 17 | ![star](https://img.shields.io/github/stars/JoeyBling/vuepress-plugin-mygitalk "star") 18 | ![fork](https://img.shields.io/github/forks/JoeyBling/vuepress-plugin-mygitalk "fork") 19 | ![GitHub Last Commit](https://img.shields.io/github/last-commit/JoeyBling/vuepress-plugin-mygitalk.svg?label=commits "GitHub Last Commit") 20 | ![issues](https://img.shields.io/github/issues/JoeyBling/vuepress-plugin-mygitalk "issues") 21 | [![Author](https://img.shields.io/badge/Author-JoeyBling-red.svg "Author")](https://zhousiwei.gitee.io "Author") 22 | [![VuePress Version](https://img.shields.io/badge/VuePress-%3E%3D%201.0.0-blue.svg)](https://v1.vuepress.vuejs.org/zh/) 23 | [![vuepress-theme-yilia-plus](https://img.shields.io/badge/Theme-Yilia_Plus-red.svg "vuepress-theme-yilia-plus")](https://github.com/JoeyBling/vuepress-theme-yilia-plus) 24 | [![博客搭建交流群](https://img.shields.io/badge/QQ群-422625065-red.svg "博客搭建交流群")](https://jq.qq.com/?_wv=1027&k=58Ypj9z "博客搭建交流群") 25 | 26 | ------------------ 27 | 28 | > **欢迎使用和Star支持,如使用过程中碰到问题,可以提出[Issue](https://github.com/JoeyBling/vuepress-plugin-mygitalk/issues),我会尽力完善** 29 | 30 | ## 介绍 31 |     **VuePress集成[Gitalk](https://github.com/gitalk/gitalk). | [Gitalk](https://github.com/gitalk/gitalk) plugin for VuePress.** 32 | 33 | - 功能还很少,欢迎各位给我提意见和建议~ 34 | - [vuepress-plugin-mygitalk](https://github.com/JoeyBling/vuepress-plugin-mygitalk) 是为 [VuePress](https://v1.vuepress.vuejs.org/zh/) `1.0.0+`制作的插件。 35 | - [Gitalk文档](https://github.com/gitalk/gitalk/blob/master/readme-cn.md#%E8%AE%BE%E7%BD%AE) 36 | - 关于申请并配置第三方应用请查看 ➡️ [https://www.jianshu.com/p/ac7658cc912f](https://www.jianshu.com/p/ac7658cc912f) 37 | 38 | ## 线上预览 39 | 40 | > **预览 ➡️ [https://zhousiwei.gitee.io/ibooks](https://zhousiwei.gitee.io/ibooks)** 41 | 42 | ## 推荐一款VuePress主题 43 | > **一款简洁优雅的VuePress主题 ➡️ [https://github.com/JoeyBling/vuepress-theme-yilia-plus](https://github.com/JoeyBling/vuepress-theme-yilia-plus)** 44 | 45 | ## 效果截图 46 | 47 | ![截图](./examples/images/web_mini.png) 48 | 49 | ## 安装 50 | 51 | ```bash 52 | yarn add vuepress-plugin-mygitalk 53 | # or 54 | npm install vuepress-plugin-mygitalk --save 55 | ``` 56 | 57 | ------------ 58 | 59 | ## 开始使用 60 | 61 | ### 引入该插件 62 | 63 | 在配置文件中引入 `vuepress-plugin-mygitalk` 64 | 65 | > 查看 [官方文档](https://v1.vuepress.vuejs.org/zh/plugin/using-a-plugin.html)。 66 | 67 | ```javascript 68 | module.exports = { 69 | plugins: [ 70 | [ 71 | 'vuepress-plugin-mygitalk' 72 | ], 73 | ], 74 | } 75 | ``` 76 | 77 | ### 插件配置 78 | 79 | ```javascript 80 | module.exports = { 81 | plugins: [ 82 | [ 83 | 'vuepress-plugin-mygitalk', { 84 | // 是否启用(关闭请设置为false)(default: true) 85 | enable: true, 86 | // 是否开启首页评论(default: true) 87 | home: true, 88 | // Gitalk配置 89 | gitalk: { 90 | // GitHub Application Client ID. 91 | clientID: '', 92 | // GitHub Application Client Secret. 93 | clientSecret: '', 94 | // GitHub repository. 存储评论的 repo 95 | repo: '', 96 | // GitHub repository 所有者,可以是个人或者组织。 97 | owner: '', 98 | // GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。(不配置默认是owner配置) 99 | admin: [''], 100 | // 设置语言(default: zh-CN) 101 | language: 'zh-CN', 102 | } 103 | } 104 | ], 105 | ], 106 | } 107 | ``` 108 | 109 | ## 其他项目支持 110 | 111 | - ### 一款简洁优雅的hexo主题:[hexo-theme-yilia-plus](https://github.com/JoeyBling/hexo-theme-yilia-plus) 112 | - ### 一款简洁优雅的VuePress主题:[vuepress-theme-yilia-plus](https://github.com/JoeyBling/vuepress-theme-yilia-plus) 113 | - ### VuePress集成Live2D看板娘:[vuepress-plugin-helper-live2d](https://github.com/JoeyBling/vuepress-plugin-helper-live2d) 114 | - ### VuePress集成Gitalk:[vuepress-plugin-mygitalk](https://github.com/JoeyBling/vuepress-plugin-mygitalk) 115 | - ### VuePress回到页首插件Plus:[vuepress-plugin-gotop-plus](https://github.com/JoeyBling/vuepress-plugin-gotop-plus) 116 | 117 | ## 捐赠 118 |     **如果感觉对您有帮助,请作者喝杯咖啡吧,请注明您的名字或者昵称,方便作者感谢o(* ̄︶ ̄*)o** 119 | 120 | | 微信 | 支付宝 | 121 | | :---: | :---: | 122 | | ![](./examples/images/weixin.png) | ![](./examples/images/alipay.jpeg) | 123 | 124 | ## 关于我 125 | - [个人博客](https://zhousiwei.gitee.io/) 126 | - [技术笔记](https://zhousiwei.gitee.io/ibooks/) 127 | - [GitHub](https://github.com/JoeyBling) 128 | - [码云](https://gitee.com/zhousiwei) 129 | - [简书](https://www.jianshu.com/u/02cbf31a043a) 130 | - [CSDN](https://blog.csdn.net/qq_30930805) 131 | - [知乎](https://www.zhihu.com/people/joeybling) 132 | - [微博](http://weibo.com/jayinfo) 133 | - **主要涉及技术:`Java后端开发`、`聚合支付`、`公众号开发`、`开源爱好者`、`Linux`** 134 | 135 | ## LICENSE 136 | 137 | [![LICENSE](https://img.shields.io/github/license/JoeyBling/vuepress-plugin-mygitalk "LICENSE")](./LICENSE "LICENSE") -------------------------------------------------------------------------------- /examples/images/alipay.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyBling/vuepress-plugin-mygitalk/46f44adc69dd7bcf0d704cdd87651cc363aabee6/examples/images/alipay.jpeg -------------------------------------------------------------------------------- /examples/images/web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyBling/vuepress-plugin-mygitalk/46f44adc69dd7bcf0d704cdd87651cc363aabee6/examples/images/web.png -------------------------------------------------------------------------------- /examples/images/web_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyBling/vuepress-plugin-mygitalk/46f44adc69dd7bcf0d704cdd87651cc363aabee6/examples/images/web_mini.png -------------------------------------------------------------------------------- /examples/images/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JoeyBling/vuepress-plugin-mygitalk/46f44adc69dd7bcf0d704cdd87651cc363aabee6/examples/images/weixin.png -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 跳转中 10 | 11 | 12 | 13 | 跳转中... 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | // 实现深拷贝 4 | const _ = require('lodash'); 5 | // 默认插件配置 6 | const defaultPluginConfig = require('./default_plugin_config'); 7 | 8 | // 自定义插件实现 9 | module.exports = (options = {}, context) => ({ 10 | /* 插件的名称 */ 11 | name: defaultPluginConfig.pluginName, 12 | 13 | /* 在应用初始化之后,并在某些特定的函数式 API 执行之前执行 */ 14 | async ready() { 15 | // Object.assign函数为浅拷贝|lodash深拷贝 16 | options = _.defaultsDeep({}, options, defaultPluginConfig); 17 | }, 18 | 19 | define() { 20 | if (options.log && options.enable) { 21 | console.log && console.log("加载" + options.pluginName + 22 | "插件配置:" + (JSON.stringify ? JSON.stringify(options) : options)); 23 | } 24 | return { 25 | pluginConfig: JSON.stringify(options) 26 | }; 27 | }, 28 | 29 | /* 指向增强文件的绝对文件路径或返回该路径的函数 */ 30 | enhanceAppFiles: [ 31 | path.resolve(__dirname, './libs/enhanceAppFile.js') 32 | ], 33 | 34 | /* 指向 mixin 文件的路径,它让你可以控制根组件的生命周期 */ 35 | clientRootMixin: path.resolve(__dirname, './libs/clientRootMixin.js'), 36 | 37 | /* 全局 UI Vue 组件 */ 38 | globalUIComponents: ['Gitalk'], 39 | 40 | /* 在生产环境的构建结束后被调用,生成的页面的路径数组将作为该函数的第一个参数 */ 41 | async generated() { 42 | 43 | }, 44 | }); 45 | -------------------------------------------------------------------------------- /libs/Gitalk.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 211 | -------------------------------------------------------------------------------- /libs/clientRootMixin.js: -------------------------------------------------------------------------------- 1 | import '../styles/gitalk-plus.styl' 2 | 3 | // mixin.js 4 | export default {} 5 | -------------------------------------------------------------------------------- /libs/enhanceAppFile.js: -------------------------------------------------------------------------------- 1 | import Gitalk from "./Gitalk.vue" 2 | import * as config from "../package.json" 3 | 4 | export default ({ 5 | Vue 6 | }) => { 7 | // 自定义扩展参数 8 | Vue.prototype.$myGitalkAppName = config.name; 9 | Vue.prototype.$myGitalkAppUrl = config.homepage; 10 | Vue.prototype.$myGitalkAppDescription = config.description; 11 | 12 | // 注册Vue全局组件 13 | Vue.component('Gitalk', Gitalk); 14 | } 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuepress-plugin-mygitalk", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "autosize": { 8 | "version": "3.0.21", 9 | "resolved": "https://registry.npmjs.org/autosize/-/autosize-3.0.21.tgz", 10 | "integrity": "sha1-8YL0DRd1fZeKE5pMnKQMTA5EhgM=" 11 | }, 12 | "axios": { 13 | "version": "0.16.2", 14 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz", 15 | "integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=", 16 | "requires": { 17 | "follow-redirects": "^1.2.3", 18 | "is-buffer": "^1.1.5" 19 | } 20 | }, 21 | "date-fns": { 22 | "version": "1.28.5", 23 | "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.28.5.tgz", 24 | "integrity": "sha1-JXz8RdMi30XvVlhmWWfuhBzXP68=" 25 | }, 26 | "debug": { 27 | "version": "3.2.6", 28 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 29 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 30 | "requires": { 31 | "ms": "^2.1.1" 32 | } 33 | }, 34 | "define-properties": { 35 | "version": "1.1.3", 36 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 37 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 38 | "requires": { 39 | "object-keys": "^1.0.12" 40 | } 41 | }, 42 | "es-abstract": { 43 | "version": "1.16.0", 44 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", 45 | "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", 46 | "requires": { 47 | "es-to-primitive": "^1.2.0", 48 | "function-bind": "^1.1.1", 49 | "has": "^1.0.3", 50 | "has-symbols": "^1.0.0", 51 | "is-callable": "^1.1.4", 52 | "is-regex": "^1.0.4", 53 | "object-inspect": "^1.6.0", 54 | "object-keys": "^1.1.1", 55 | "string.prototype.trimleft": "^2.1.0", 56 | "string.prototype.trimright": "^2.1.0" 57 | } 58 | }, 59 | "es-to-primitive": { 60 | "version": "1.2.0", 61 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", 62 | "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", 63 | "requires": { 64 | "is-callable": "^1.1.4", 65 | "is-date-object": "^1.0.1", 66 | "is-symbol": "^1.0.2" 67 | } 68 | }, 69 | "es6-promise": { 70 | "version": "4.1.1", 71 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", 72 | "integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==" 73 | }, 74 | "follow-redirects": { 75 | "version": "1.9.0", 76 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", 77 | "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", 78 | "requires": { 79 | "debug": "^3.0.0" 80 | } 81 | }, 82 | "for-each": { 83 | "version": "0.3.3", 84 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", 85 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", 86 | "requires": { 87 | "is-callable": "^1.1.3" 88 | } 89 | }, 90 | "function-bind": { 91 | "version": "1.1.1", 92 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 93 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 94 | }, 95 | "gitalk": { 96 | "version": "1.5.0", 97 | "resolved": "https://registry.npmjs.org/gitalk/-/gitalk-1.5.0.tgz", 98 | "integrity": "sha512-xao+Fs+ibAg5tetdTIDHmoVDOtMc0l7gvQd5j2geddL6JoKkonbEY05BU87Io0PpmonqIBSi/Ue+CpUDs9M/JQ==", 99 | "requires": { 100 | "autosize": "3.0.21", 101 | "axios": "0.16.2", 102 | "date-fns": "1.28.5", 103 | "es6-promise": "4.1.1", 104 | "github-markdown-css": "2.8.0", 105 | "node-polyglot": "2.2.2", 106 | "preact": "8.1.0", 107 | "preact-compat": "3.16.0", 108 | "react-flip-move": "2.9.14" 109 | } 110 | }, 111 | "github-markdown-css": { 112 | "version": "2.8.0", 113 | "resolved": "https://registry.npmjs.org/github-markdown-css/-/github-markdown-css-2.8.0.tgz", 114 | "integrity": "sha1-nAP2RvVQt+P9nuCuKe4D6i/mg6M=" 115 | }, 116 | "has": { 117 | "version": "1.0.3", 118 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 119 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 120 | "requires": { 121 | "function-bind": "^1.1.1" 122 | } 123 | }, 124 | "has-symbols": { 125 | "version": "1.0.0", 126 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", 127 | "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" 128 | }, 129 | "immutability-helper": { 130 | "version": "2.9.1", 131 | "resolved": "https://registry.npmjs.org/immutability-helper/-/immutability-helper-2.9.1.tgz", 132 | "integrity": "sha512-r/RmRG8xO06s/k+PIaif2r5rGc3j4Yhc01jSBfwPCXDLYZwp/yxralI37Df1mwmuzcCsen/E/ITKcTEvc1PQmQ==", 133 | "requires": { 134 | "invariant": "^2.2.0" 135 | } 136 | }, 137 | "invariant": { 138 | "version": "2.2.4", 139 | "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", 140 | "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", 141 | "requires": { 142 | "loose-envify": "^1.0.0" 143 | } 144 | }, 145 | "is-buffer": { 146 | "version": "1.1.6", 147 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 148 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 149 | }, 150 | "is-callable": { 151 | "version": "1.1.4", 152 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", 153 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" 154 | }, 155 | "is-date-object": { 156 | "version": "1.0.1", 157 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", 158 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" 159 | }, 160 | "is-regex": { 161 | "version": "1.0.4", 162 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", 163 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", 164 | "requires": { 165 | "has": "^1.0.1" 166 | } 167 | }, 168 | "is-symbol": { 169 | "version": "1.0.2", 170 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", 171 | "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", 172 | "requires": { 173 | "has-symbols": "^1.0.0" 174 | } 175 | }, 176 | "js-tokens": { 177 | "version": "4.0.0", 178 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 179 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" 180 | }, 181 | "lodash": { 182 | "version": "4.17.15", 183 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 184 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" 185 | }, 186 | "loose-envify": { 187 | "version": "1.4.0", 188 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", 189 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", 190 | "requires": { 191 | "js-tokens": "^3.0.0 || ^4.0.0" 192 | } 193 | }, 194 | "ms": { 195 | "version": "2.1.2", 196 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 197 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 198 | }, 199 | "node-polyglot": { 200 | "version": "2.2.2", 201 | "resolved": "https://registry.npmjs.org/node-polyglot/-/node-polyglot-2.2.2.tgz", 202 | "integrity": "sha1-Gj921zkvg26ggjg27egX5upuwmw=", 203 | "requires": { 204 | "for-each": "^0.3.2", 205 | "has": "^1.0.1", 206 | "string.prototype.trim": "^1.1.2", 207 | "warning": "^3.0.0" 208 | } 209 | }, 210 | "object-assign": { 211 | "version": "4.1.1", 212 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 213 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 214 | }, 215 | "object-inspect": { 216 | "version": "1.6.0", 217 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", 218 | "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" 219 | }, 220 | "object-keys": { 221 | "version": "1.1.1", 222 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 223 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" 224 | }, 225 | "preact": { 226 | "version": "8.1.0", 227 | "resolved": "https://registry.npmjs.org/preact/-/preact-8.1.0.tgz", 228 | "integrity": "sha1-8DW4CO67dORtViRrAsoPGQttZXQ=" 229 | }, 230 | "preact-compat": { 231 | "version": "3.16.0", 232 | "resolved": "https://registry.npmjs.org/preact-compat/-/preact-compat-3.16.0.tgz", 233 | "integrity": "sha1-zyvBsvj8oUkA1oCU+eELizKcxB4=", 234 | "requires": { 235 | "immutability-helper": "^2.1.2", 236 | "preact-render-to-string": "^3.6.0", 237 | "preact-transition-group": "^1.1.0", 238 | "prop-types": "^15.5.8", 239 | "standalone-react-addons-pure-render-mixin": "^0.1.1" 240 | } 241 | }, 242 | "preact-render-to-string": { 243 | "version": "3.8.2", 244 | "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-3.8.2.tgz", 245 | "integrity": "sha512-przuZPajiurStGgxMoJP0EJeC4xj5CgHv+M7GfF3YxAdhGgEWAkhOSE0xympAFN20uMayntBZpttIZqqLl77fw==", 246 | "requires": { 247 | "pretty-format": "^3.5.1" 248 | } 249 | }, 250 | "preact-transition-group": { 251 | "version": "1.1.1", 252 | "resolved": "https://registry.npmjs.org/preact-transition-group/-/preact-transition-group-1.1.1.tgz", 253 | "integrity": "sha1-8KSTJ+pRXs406ivoZMSn0p5dbhA=" 254 | }, 255 | "pretty-format": { 256 | "version": "3.8.0", 257 | "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", 258 | "integrity": "sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U=" 259 | }, 260 | "prop-types": { 261 | "version": "15.7.2", 262 | "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", 263 | "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", 264 | "requires": { 265 | "loose-envify": "^1.4.0", 266 | "object-assign": "^4.1.1", 267 | "react-is": "^16.8.1" 268 | } 269 | }, 270 | "react-flip-move": { 271 | "version": "2.9.14", 272 | "resolved": "https://registry.npmjs.org/react-flip-move/-/react-flip-move-2.9.14.tgz", 273 | "integrity": "sha1-O2DkRJOku+EVqMPWeLhEd2u6tFM=" 274 | }, 275 | "react-is": { 276 | "version": "16.11.0", 277 | "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz", 278 | "integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==" 279 | }, 280 | "standalone-react-addons-pure-render-mixin": { 281 | "version": "0.1.1", 282 | "resolved": "https://registry.npmjs.org/standalone-react-addons-pure-render-mixin/-/standalone-react-addons-pure-render-mixin-0.1.1.tgz", 283 | "integrity": "sha1-PHQJ9MecQN6axyxhbPZ5qZTzdVE=" 284 | }, 285 | "string.prototype.trim": { 286 | "version": "1.2.0", 287 | "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.0.tgz", 288 | "integrity": "sha512-9EIjYD/WdlvLpn987+ctkLf0FfvBefOCuiEr2henD8X+7jfwPnyvTdmW8OJhj5p+M0/96mBdynLWkxUr+rHlpg==", 289 | "requires": { 290 | "define-properties": "^1.1.3", 291 | "es-abstract": "^1.13.0", 292 | "function-bind": "^1.1.1" 293 | } 294 | }, 295 | "string.prototype.trimleft": { 296 | "version": "2.1.0", 297 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", 298 | "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", 299 | "requires": { 300 | "define-properties": "^1.1.3", 301 | "function-bind": "^1.1.1" 302 | } 303 | }, 304 | "string.prototype.trimright": { 305 | "version": "2.1.0", 306 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", 307 | "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", 308 | "requires": { 309 | "define-properties": "^1.1.3", 310 | "function-bind": "^1.1.1" 311 | } 312 | }, 313 | "warning": { 314 | "version": "3.0.0", 315 | "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", 316 | "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", 317 | "requires": { 318 | "loose-envify": "^1.0.0" 319 | } 320 | } 321 | } 322 | } 323 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuepress-plugin-mygitalk", 3 | "version": "1.0.5", 4 | "description": "VuePress集成Gitalk. | Gitalk plugin for VuePress.", 5 | "main": "index.js", 6 | "publishConfig": { 7 | "access": "public" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/JoeyBling/vuepress-plugin-mygitalk.git" 15 | }, 16 | "keywords": [ 17 | "vue", 18 | "vuepress", 19 | "vuepress-plugin", 20 | "yilia-plus", 21 | "generator", 22 | "gitalk", 23 | "issues", 24 | "github" 25 | ], 26 | "author": { 27 | "name": "JoeyBling", 28 | "email": "2434387555@qq.com", 29 | "url": "https://zhousiwei.gitee.io" 30 | }, 31 | "license": "MIT", 32 | "bugs": { 33 | "url": "https://github.com/JoeyBling/vuepress-plugin-mygitalk/issues" 34 | }, 35 | "homepage": "https://github.com/JoeyBling/vuepress-plugin-mygitalk", 36 | "dependencies": { 37 | "gitalk": "^1.5.0", 38 | "lodash": "^4.17.15" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /styles/gitalk-plus.styl: -------------------------------------------------------------------------------- 1 | // Gitalk Override Styles 2 | // 可以通过`palette.styl`重写覆盖(https://v1.vuepress.vuejs.org/zh/config/#palette-styl) 3 | $gitalkContainer ?= '#my-gitalk-container'; 4 | 5 | {$gitalkContainer} { 6 | // width: 100%; 7 | margin: 0 auto; 8 | padding: 2rem 3.5rem; 9 | // padding: 2rem 2.5rem; 10 | } --------------------------------------------------------------------------------