For several monthes, I have not updated my personal blog on github homepage. Some errors occur with my local blog, which is possibly due to the missing of some configuration files. Then I spent sometime to recover the blog homepage and try to apply a new theme Chis, which is more elegent than previous Aath theme.

hexo blog generation bugs

hexo server error

This bug appear when the updated hexo can find the server command. It is caused by the new version update of hexo is not included with the hexo-server package by default [1]. To solve this probem, you can just install the hexo-sever package.

1
npm install hexo-server --save

hexo server Cannot GET bug

This error is might be caused with some components are missiong, you can solve it via the discreption in this blog [2]. Where you can run the below command to check which component is missing:

1
npm audit fix

After installed the missing components, run:

1
2
3
hexo clean
hexo g
hexo s -p 5000

And open the local blog page at: http://localhost:5000
to check whether your new static test page is ok.

Enable better latex rendering

The default latex rendering component is hexo-renderer-marked, but this way of rendering has some drawbacks. It only support the most simple kind of rendering of latex funxtions with inline equation: inlineeqinline-eq, and cross-line equation:

crosslineeqcross-line-eq

If you latex math function is written within the begin/fundtion, end/function, it will not work. For example:

\begin{equation} \begin{array}{l} A_1 x + B_1 y = C_1\\ A_2 x + B_2 y^2 = C_2 \end{array} \end{equation}

One of the solutions is to use the new latex renderer: hexo-rederer-markdown-it-plus as introduced in this blog [3]. With this kind of new redering approach, the equations in begin/equation could not only be displayed correctly but also be labeled with numbered orders.

Deploy to your github homepage

After these steps, there remains the last problem with deploy of local site on github homepage. After some test, I find it’s the problem with the installation of hexo deployer component [4]. After this installation, the local blog is deployed successfully.

1
npm install hexo-deployer-git --save

Reference

[1] https://hexo.io/docs/server
[2] https://www.jianshu.com/p/af83fc73e525
[3] http://dawnote.net/2017/12/01/如何在HEXO中渲染Latex数学公式/
[4] https://www.cnblogs.com/liuxianan/p/build-blog-website-by-hexo-github.html