First go to the root directory of your Hexo project and run
shellnpm install hexo-math hexo-renderer-pandoc #when you use npm # or yarn add hexo-math hexo-renderer-pandoc #when you use yarn
yml#plugins markdown: plugins: .... - hexo-math #add this ..... # add this MathJax configuration math: engine: 'mathjax' mathjax: src: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML
You need to install the pandoc command to support LaTeX parsing
shellbrew install pandoc #when you use macOS # or sudo apt-get install pandoc #when you use ubuntu
If you have already built the project, first go to the project root directory and clear the cache
shellhexo clean
Then run the normal Hexo generate and test
shellhexo g & hexo s
Test LaTeX, and you should get Figure 1.1
,[object Object],
Figure 1.1