不定期更新各类使用过程中遇到的问题
使用版本:hexo 5.1&&next 7.8
问题一:
点击“阅读全文”后,会直接滚动到原文中\下,且config里面没有scroll_to_more配置,如何从头开始阅读。
参考博文hexo关于next主题scroll_to_more失效进行如下设置
修改\themes\next\layout_macro\post.swig中
1 | <a class="btn" href="{{ url_for(post.path) }}#more" rel="contents"> |
为
1 | <a class="btn" href="{{ url_for(post.path) }}" rel="contents"> |
问题二:
markdown语法嵌入数学公式无法正常显示
更换渲染引擎:
1 | npm uninstall hexo-renderer-marked --save |
更改node_modules\kramed\lib\rules\inline.js文件中第11行和第20行
1 | // escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/, |
1 | // em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, |
在主题中配置文件中开启mathjax开关
1 | # MathJax Support |
还需要在文章的Front-matter里打开mathjax开关
1 | --- |