惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
IT之家
IT之家
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
L
LangChain Blog
博客园 - Franky
美团技术团队
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
小众软件
小众软件
Y
Y Combinator Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
把 Hexo 的评论系统切换为 gitment
2018-02-01 · via jdhao's digital space

好几个月前就知道有人用 GitHub 的 issue 功能为 Hexo 制作了一个评论系统 gitment,决定尝试一下 gitment 。

简单配置#

我使用的是 NexT 主题,最新版已经引入了 gitment 的支持,因此配置相对比较简单。首 先点击这里注册 GitHub OAuth,示 例配置如下:

在接下来的页面,也会看到自己的 Client ID 以及 Client Secret,如下图所示,

接下来打开 NexT 主题的配置文件,位于 hexo\blog 目录下的 theme\next\_config.yml。 扎到 gitment 部分,示例配置如下:

gitment:
  enable: enable
  mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway

  count: true # Show comments count in post meta area

  lazy: false # Comments lazy loading with a button

  cleanly: false # Hide 'Powered by ...' on footer, and more

  language: en
  github_user: jdhao
  github_repo: jdhao.github.io #the name of the repo used to host your blog
  client_id: xxxxxxx
  client_secret: xxxxxx
  proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect

  redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled

设置完成以后重新 generate blog 即可。

使用#

初次使用,对于一篇博客,想要评论,必须登录自己的 GitHub 帐号,同时如果是第一次 评论,需要点击 Initialize Comments:

然后就可以进行评论了。

值得警惕的事情#

如果你使用 GitHub 帐号评论别人的博客,博客的主人将有权力读写你的账户下 repo 的 数据,所以可能会造成一些安全问题 ,如果介意的话,最好 不要使用 gitment。


参考#