博客搭建之路:next主题数学公式问题
next主题数学公式问题
我写的都是一些编程相关的文章,有些文章里是存在数学公式的,我在Typora软件中写的时候显示的是对的,但是hexo将markdown转为html后在页面上就没有数学公式的格式了。
查找next配置发现有一个渲染数学公式的配置
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
# 设置为true,就只渲染那些配置了mathjax: true的页。如果设置为false,会渲染所有页,影响性能
per_page: true
# npm install hexo-renderer-kramed --save
# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true
# See: https://mhchem.github.io/MathJax-mhchem/
mhchem: false
将math.mathjax.enable
设置为true。需要安装hexo-renderer-kramed
npm install hexo-renderer-kramed --save
然后在对应的需要数学公式渲染的文章上加上mathjax: true
如
---
title: 排序算法
author: ZH
date: 2021-01-12 17:57:23
tags:
- 数据结构与算法
categories: 数据结构与算法
mathjax: true
---
看一篇文章说是需要先将hexo-renderer-marked
卸载掉,这个我回头试一下是否需要卸载
npm uninstall hexo-renderer-marked --save
这个测了一下,不需要将之前的卸载掉,两者不冲突
参考文献
本文来自博客园,作者:拾光师,转载请注明原文链接:https://www.cnblogs.com/life-time/p/18541323 个人博客-> https://zhhll.icu
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!