https://github.com/snowdreams1006/hexo-plugin-gitalk
Hexo 整合 gitalk 组件实现博客评论功能
https://github.com/snowdreams1006/hexo-plugin-gitalk
comment discuss gitalk gitbook gitbook-plugin-mygitalk github gitment hexo hexo-plugin-gitalk issues mygitalk
Last synced: 7 months ago
JSON representation
Hexo 整合 gitalk 组件实现博客评论功能
- Host: GitHub
- URL: https://github.com/snowdreams1006/hexo-plugin-gitalk
- Owner: snowdreams1006
- License: mit
- Created: 2019-10-15T13:55:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-13T04:14:22.000Z (about 6 years ago)
- Last Synced: 2025-06-28T12:16:41.403Z (8 months ago)
- Topics: comment, discuss, gitalk, gitbook, gitbook-plugin-mygitalk, github, gitment, hexo, hexo-plugin-gitalk, issues, mygitalk
- Language: CSS
- Homepage: https://snowdreams1006.github.io/hexo-plugin-gitalk/
- Size: 639 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 欢迎访问 hexo-plugin-gitalk 官网 👋
[](https://www.npmjs.com/package/hexo-plugin-gitalk)
[](https://www.npmjs.com/package/hexo-plugin-gitalk)
[](https://github.com/snowdreams1006/hexo-plugin-gitalk#readme)
[](https://github.com/snowdreams1006/hexo-plugin-gitalk/graphs/commit-activity)
[](https://github.com/snowdreams1006/hexo-plugin-gitalk/blob/master/LICENSE)
[](https://github.com/snowdreams1006)
[](https://snowdreams1006.github.io/snowdreams1006-wechat-public.jpeg)
> Hexo 整合 gitalk 组件实现博客评论功能
### 🏠 [主页](https://github.com/snowdreams1006/hexo-plugin-gitalk#readme)
- Github : [https://snowdreams1006.github.io/hexo-plugin-gitalk/](https://snowdreams1006.github.io/hexo-plugin-gitalk/)
- Gitee : [https://snowdreams1006.gitee.io/hexo-plugin-gitalk/](https://snowdreams1006.gitee.io/hexo-plugin-gitalk/)
- Gitlab : [https://snowdreams1006.gitlab.io/hexo-plugin-gitalk/](https://snowdreams1006.gitlab.io/hexo-plugin-gitalk/)
## 效果

## 用法
### Step #1 - 更新 `_config.yml` 配置文件
在 `_config.yml` 配置文件中,配置 `gitalk` 插件相关信息,详情见 [gitalk](https://github.com/gitalk/gitalk).
```yml
plugins:
gitalk:
clientID: GitHub Application Client ID
clientSecret: GitHub Application Client Secret
repo: GitHub repo
owner: GitHub repo owner
admin:
- GitHub repo owner and collaborators, only these guys can initialize github issues
distractionFreeMode: false
```
> 注意: 前往 [gitalk](https://github.com/gitalk/gitalk) 申请开通 `gitalk` 功能后,**一定要替换成自己的相关配置**!
其中,主要配置参数含义如下:
- **clientID** `String`
**必须**. GitHub Application Client ID.
- **clientSecret** `String`
**必须**. GitHub Application Client Secret.
- **repo** `String`
**必须**. GitHub repository.
- **owner** `String`
**必须**. GitHub repository 所有者,可以是个人或者组织。
- **admin** `Array`
**必须**. GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。
- **distractionFreeMode** `Boolean`
Default: false。
类似Facebook评论框的全屏遮罩效果.
### Step #2 - 运行 hexo 相关命令
- 运行 `npm install` 命令安装到本地项目
```bash
$ npm install hexo-plugin-gitalk --save
```
- 运行 `hexo generate` 命令构建本地项目或者 `hexo server` 启动本地服务.
```bash
$ hexo generate
```
或者
```bash
$ hexo server
```
> 注意: 本地测试时无法正常运行,必须是线上环境才会生效,且必须由管理员登录github进行初始化.
## 示例
不仅 [hexo-plugin-gitalk](https://github.com/snowdreams1006/hexo-plugin-gitalk) **官方文档**已整合 `gitalk` 版权保护插件,此外还提供了示例项目,详情参考 `example` 目录.
- [官方文档](https://github.com/snowdreams1006/hexo-plugin-gitalk/tree/master/docs)
- [官方示例](https://github.com/snowdreams1006/hexo-plugin-gitalk/tree/master/example)
## 作者
👤 **snowdreams1006**
- Github: [@snowdreams1006](https://github.com/snowdreams1006)
- Email: [snowdreams1006@163.com](mailto:snowdreams1006@163.com)
## 🤝 贡献
如果你想贡献自己的一份力量,欢迎提交 [`Issues`](https://github.com/snowdreams1006/hexo-plugin-gitalk/issues) 或者 `Pull Request` 请求!
## 支持
如果本项目对你有所帮助,欢迎 ⭐️ [hexo-plugin-gitalk](https://github.com/snowdreams1006/hexo-plugin-gitalk) 项目,感谢你的支持与认可!
## 📝 版权
Copyright © 2019 [snowdreams1006](https://github.com/snowdreams1006).
This project is [MIT](https://github.com/snowdreams1006/hexo-plugin-gitalk/blob/master/LICENSE) licensed.