什麼是 hexo-plugin-gitalk
Hexo 整合 gitalk 組件實現博客評論功能
主頁[1]
效果
用法
Step #1 - 更新 _config.yml 配置文件
在 _config.yml 配置文件中,配置 gitalk 插件相關信息,詳情見 gitalk[2].
注意: 前往 gitalk[3] 申請開通 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 命令安裝到本地項目
$ npm install hexo-plugin-gitalk --save
- 運行 hexo generate 命令構建本地項目或者 hexo server 啟動本地服務.
$ hexo generate
或者
$ hexo server
注意: 本地測試時無法正常運行,必須是線上環境才會生效,且必須由管理員登錄 github 進行初始化.
示例
不僅 hexo-plugin-gitalk[4] 官方文檔已整合 gitalk 版權保護插件,此外還提供了示例項目,詳情參考 example 目錄.
- 官方文檔[5]
- 官方示例[6]
作者
snowdreams1006
- Github: @snowdreams1006 [7]
- Email: [email protected][8]
貢獻
如果你想貢獻自己的一份力量,歡迎提交 `Issues`[9] 或者 Pull Request 請求!
支持
如果本項目對你有所幫助,歡迎 ⭐ hexo-plugin-gitalk[10] 項目,感謝你的支持與認可!
Copyright © 2019 snowdreams1006[11].
This project is
MIT[12] licensed.[1]主頁: https://github.com/snowdreams1006/hexo-plugin-gitalk#readme
[2]gitalk: https://github.com/gitalk/gitalk
[3]gitalk: https://github.com/gitalk/gitalk
[4]hexo-plugin-gitalk: https://github.com/snowdreams1006/hexo-plugin-gitalk
[5]官方文檔: https://github.com/snowdreams1006/hexo-plugin-gitalk/tree/master/docs
[6]官方示例: https://github.com/snowdreams1006/hexo-plugin-gitalk/tree/master/example
[7]@snowdreams1006: https://github.com/snowdreams1006
[8][email protected]: mailto:[email protected]
[9]Issues: https://github.com/snowdreams1006/hexo-plugin-gitalk/issues
[10]hexo-plugin-gitalk: https://github.com/snowdreams1006/hexo-plugin-gitalk
[11]snowdreams1006: https://github.com/snowdreams1006
[12]MIT: https://github.com/snowdreams1006/hexo-plugin-gitalk/blob/master/LICENSE
閱讀更多 雪之夢技術驛站 的文章