
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
hexo-disqus-proxy-heroku
Advanced tools
you can use heroku app update server, hexo blog use disqus api get info, In China
DISQUS_API_SECRECT:
获取
api-secret
DISQUS_SHORT_NAME:
是你的website的 shortname 名称 比如在你的disqus安
heroku
可以设置 链接 github
项目时,自动部署,新的 git commit
中 开头或 结尾 要是ci
才会执行api-secret
在使用本插件之前需要在 Disqus 申请开启 api 权限。访问register new application 就可以注册一个 application.然后在applications可以看到你的 application 列表。其中 Secret Key 就是我们需要的api-secret,并且需要在后台的Settings => Community里开启访客评论
在Hexo
博客目录执行
npm install hexo-disqus-proxy-heroku --save
在你的Hexo
博客目录中修改_config.yml
文件
添加如下配置:(注意缩进和空格)
disqus_proxy:
shortname: yobrave
host: XXXX.herokuapp.com
admin_avatar: /avatars/admin-avatar.jpg
default_avatar: /avatars/default-avatar.png
其中:
shortname
是你的website的 shortname 名称 比如在你的disqus安装代码中 有这样一句脚本:
s.src = 'https://test-eo9kkdlcze.disqus.com/embed.js';
那么你的disqus 的shortname 就是 test-eo9kkdlczehost
是 herokuappdefault_avatar
和admin_avatar
分别是默认头像和管理员头像的路径。例如在source
目录下建立avatars
目录,放入两个头像,在这里设置成绝对路径。如果不设置,则为默认头像。在disqus
的官方配置中,我们需要在页面合适位置添加一个 <div id="disqus_thread"></div>
作为占位符,
而hexo-disqus-proxy
插件并不能知道在页面的哪个位置插入这个标签比较合适,所以这个需要额外配置一下:
如果你本身用的主题已经支持disqus
的配置,那么灰常爽,你只需要正常启用主题的disqus评论,插件就会自动检测并合适的覆盖,
这是最常见的情况,肯定是最吼的。
在你写的markdown
文件底部插入<div id="disqus_thread"></div>
。这样评论框位置会位于文章的下方,并且大小能被外部元素所约束,不会乱跑。
什么,markdown
也能插入HTML
标签?
嗯是的。
稍微懂一点点hexo
的基本知识,自己改主题。大概的思路是,在Hexo
渲染的过程中,把<div id="disqus_thread"></div>
加在主题目录下的layout目录中
关于博文页面的模板中的合适的位置就行了。
#Done!!
import 'core-js/fn/promise'
import "regenerator-runtime/runtime";
FAQs
you can use heroku app update server, hexo blog use disqus api get info, In China
The npm package hexo-disqus-proxy-heroku receives a total of 1 weekly downloads. As such, hexo-disqus-proxy-heroku popularity was classified as not popular.
We found that hexo-disqus-proxy-heroku demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.