在hexo中插入数学公式

上一篇写了如何在Markdown编辑器之中插入latex公式。那么如果想插入公式的文章发表到Hexo建立的博客上,应该怎么办呢?

关键点: 更换Hexo默认的渲染引擎

有人介绍可以更换pandoc,结果试了半天总是有问题。最终用了hexo-renderer-markdown-it进行渲染,一切顺利。

操作也是跟其他的同样,先卸载原来的引擎,然后安装markdown引擎:

npm uninstall hexo-renderer-marked –save

npm install hexo-renderer-markdown-it –save

PS. 建议用cnpm安装,这样会顺利一些。

安装完成以后就可以顺利发布了。

$$argmax \ f(x):={x|x\in S \wedge \forall y \in S: f(y) \leq f(x)}$$