Hexo的Next主题升级问题

2026年10月25日我决定升级一下我的 Next 主题,因为2026年的更新一直没有做,有些性能改善和bug修复肯定有不少,并且版本号从 NexT 8.21.0 一路升级到了 NexT 8.29.0, 但是在 8.22.0 的 Bug Fixes 部分记录了一项改动

1
Use auto-fill in link-grid

这个操作的逻辑是根据浏览器的缩放程度自动判断link-grid的列数,但是对于我的博客来讲,我希望维持原来的两列。于是使用diary -tu升级主题后,进一步修改themes/source/css/_common/scaffolding/tags/link-grid.styl 文件中

修改这个自动判断模式
1
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

为

恢复为原来的两列模式
1
grid-template-columns: 1fr 1fr;

完成上述修改后,依次执行:

注意依次执行下述命令
1
2
3
4
5
6
7
8
9
diary -tu
cd ~/.DY_SCE/fungzhenhua.github.io.local/
yarn upgrade
hexo clear
hexo g
git add .
git commit -m "theme update"
git push -f
diary -d

[!WARNING] 由于hexo-renderer-pandoc插件内部硬编码了--mathjax, 而当前Pandoc 3.11中已经标记--mathjax为Deprecated,所以编译时会出现警告提示。这个问题等下次升级Pandoc后或许将变的不可执行,所以需要等hexo-renderer-pandoc升级后解决,这点需要特别注意。