current position:Home>Building a blog with GitHub pages + hexo (10) the next theme of hexo blog mathjax mathematical formula rendering problem

Building a blog with GitHub pages + hexo (10) the next theme of hexo blog mathjax mathematical formula rendering problem

2022-04-29 04:21:22Xia ordinary

【 Roof placement 】【 special column 】 use Github Pages+Hexo Build a blog

In use Markdown When writing technical documents , I can't help but encounter mathematical formulas .

frequently-used Markdown Editors will integrate Mathjax, Used to render classes in documents Latex Mathematical formula written in format .

be based on Hexo Build a personal blog , How to render mathematical formulas by default ? Let's talk about it ~

1. Turn on... In theme configuration mathjax switch

Open theme profile /themes/next/_config.yml, The configuration is as follows :

# Math Formulas Render Support
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.
  per_page: true

  # hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
  mathjax:
    enable: true

 Insert picture description here

2. In the article Front-matter Open in mathjax switch

It also needs to be in the... Of the article Front-matter Open in mathjax switch , as follows :

---
title:  Problem solving notes ——C Backtracking algorithm 
date: 2020-10-12 20:00:00
toc: ture
categories: 
- LeetCode
-  Problem solving collection 
mathjax: true
---

3. Restart deployment Hexo

hexo clean
hexo g
hexo d

Successfully rendered
 Insert picture description here

copyright notice
author[Xia ordinary],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/118/202204280553438332.html

Random recommended