How to allow hexo render LaTeX formulas correctly
How to render formulas in hexo blog (theme ‘fluid’)
By default, formulas are not rendered and cannot be correctly displayed. To fix this, the first step is to uninstall the default renderer and install renderer. ( is also an alternative, but it may fail to render some complex formulas).
In terminal, cd
to your hexo directory, and run the following
1 |
|
and then
1 |
|
To get a better view, hexo-math
plugin (by hexo official) is recommended, which makes your math text looks better.
1 |
|
After that, modify some configurations:
In ‘fluid’ theme _config.fluid.yml
, modify the corresponding part to the following:
1 |
|
Note that specific
means to only enable formula conversion when math: true
is found in front-matter, in order to boost loading speed when no formula.
Finally,
1 |
|
Reference: link
How to allow hexo render LaTeX formulas correctly
https://www.billhu.us/2022/10_hexo_katex/