klugjo / hexo-theme-clean-blog

Hexo implementation of Clean Blog http://blackrockdigital.github.io/startbootstrap-clean-blog/index.html
MIT License
401 stars 129 forks source link

How to enable Latex in this theme #60

Open hatute opened 5 years ago

hatute commented 5 years ago

Since I need to post some articles with latex equations, and install the Hexo Math plugin. But when the site deployed, the latex part still cannot display properly. Should I add some configurations in the theme's _config.yml or something else ?

klugjo commented 5 years ago

Hi,

It is not supported at this time. Do you know a good library to display latex equations on a page, or do you know another theme that has it ?

hatute commented 5 years ago

@klugjo Hi,

For now, I found two ways to solve this problem.

  1. Add a self-made file mathjax.ejs under the clean-blog/layout/
    
    <!-- mathjax config similar to math.stackexchange -->

and then add `<%- partial('mathjax') %>` between `<body> ... </body>` label

2. Change to [hexo-theme-next](https://github.com/theme-next/hexo-theme-next) which supports latex
stevenjoezhang commented 4 years ago

You can use this Hexo plugin: https://github.com/next-theme/hexo-filter-mathjax