saicaca / hexo-theme-vivia

A clean and minimalist theme for Hexo.
https://saicaca.github.io/vivia-preview/
MIT License
329 stars 40 forks source link

功能:公式编辑 #35

Closed Antidington closed 9 months ago

Antidington commented 9 months ago

我编辑了几个公式块但是没办法正常显示,请问是不支持公式块吗?

image
Movelocity commented 9 months ago

可以换成hexo-renderer-markdown-it-plus来渲染,操作如下

  1. npm un hexo-renderer-marked --save

  2. npm i @upupming/hexo-renderer-markdown-it-plus --save

  3. 找到模板的layout文件layout.ejs,在合适的地方加上 <link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.10.2/katex.min.css" rel="stylesheet">

  4. 配置文件加入相关配置

    math:
    enable: true
    specific: false
    engine: katex
  5. hexo clean & hexo g

Antidington commented 9 months ago

可以换成hexo-renderer-markdown-it-plus来渲染,操作如下

  1. npm un hexo-renderer-marked --save
  2. npm i @upupming/hexo-renderer-markdown-it-plus --save
  3. 找到模板的layout文件layout.ejs,在合适的地方加上 <link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.10.2/katex.min.css" rel="stylesheet">
  4. 配置文件加入相关配置
math:
  enable: true
  specific: false
  engine: katex
  1. hexo clean & hexo g

谢谢,已解决!😋