Time to make a separate article for this matter.


Today I finally re-installed my system. Hate migration the most. It is worth noting that, compiled node modules can be reused and the compatible node version is 16, at least not the latest LTS. and there’s no need to install hexo globally, just in the folder is enough. while using add npx at front works fine.


Every time I try to add some features and the blog will malfunction due to some dependency errors and what so ever, which takes a lot of extra time to do some update or check verions..etc.

When migrating I always forget what extensions I added in previous one.
Maybe just add here for reference.

[Sat Mar 11 2023, 15:42] Fix: Equation rendering on site
Rendering at localhost works fine, but unable to see them at remote site.
Chrome error:

1
Mixed Content: The page at 'xxx' was loaded over HTTPS, but requested an insecure script 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'. This request has been blocked; the content must be served over HTTPS.

Change url in node_modules/hexo-renderer-mathjax/mathjax.html

Mathjax CDN shutting down

1
Using alternatives, like: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?...'

[Tue Mar 22 2022, 11:59] Index Improvement
Feed:

1
$ npm i hexo-generator-feed 

Pin-top:
1
2
$ npm un hexo-generator-index
$ npm i hexo-generator-index-pin-top


[Tue Mar 22 2022, 14:25] Latex support

1
2
3
$ npm Un hero-renderer-marked
$ npm i hexo-renderer-kramed
$ npm i hexo-renderer-mathjax

with modification of
node_modules/hexo-renderer-kramed/lib/renderer.js
node_modules/kramed/lib/rules/inline.js
node_modules/hexo-renderer-mathjax/mathjax.html

But maybe there’s a more elegant way to render latex, the website itself is static, so there’s not too much to worry about even using some deprecated components. But there exists some extensions like hexo-math, which I don’t know how it works and why it didn’t work, but one day I should swtich to it.

Well and plus, kramed does render quick. A lot faster than pandoc.

BTW, because render for LaTeX wasn’t available, so many equations were typed in different ways, which I suppose, I could have little time to fix.