离梦之殇 如梦之境

认清自我,扩展边界.
To See Outer. To See Inner.

关于Hexo安装中的一些问题和方法

执行npm install hexo-cli -g后无反应

解决方法是要把npm的仓库源换成国内的。

命令如下:

1
npm config set registry https://registry.npm.taobao.org

在Hexo中使用KaTeX的方法

目前看下来最好的方法是使用hexo-katex以及hexo-renderer-pandoc

操作如下:

1
2
3
4
npm uninstall hexo-renderer-marked --save
npm install hexo-renderer-pandoc --save

npm install hexo-katex --save

并在_config.yml中加入

1
2
pandoc:
mathEngine: katex

参考《为 Hexo 更换数学渲染引擎为 KaTeX》

用hexo-abbrlink为博文绑定Disqus(Hexo主题 Journal)

先安装hexo-abbrlink.

然后将\themes\journal\layout\_include\comment_includes.ejs进行修改

1
2
3
4
5
var disqus_config = function () {
this.page.url = '<%= config.url + config.root + page.path %>';
this.page.identifier = '<%= page.abbrlink %>';
//'<%= config.root + page.path %>';
};

Proudly powered by Hexo and Theme by Hacker
© 2022 Rainbow Yang