[opt] global parser

This commit is contained in:
xaoxuu 2024-01-21 19:56:04 +08:00
parent 2a732b3f88
commit f51bf78826
3 changed files with 7 additions and 7 deletions

View File

@ -420,7 +420,7 @@ plugins:
# 需在Markdown文件开头加入mathjax: true # 需在Markdown文件开头加入mathjax: true
# 推荐使用Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save # 推荐使用Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save
mathjax: mathjax:
# set <mathjax: true> to enable in page's front-matter enable: # true # 可以在特定文章的 front-matter 中设置 mathjax: true 来开启,也可以在这里设置全局开启
js: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML js: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML
# Katex - The fastest math typesetting library for the web # Katex - The fastest math typesetting library for the web
@ -428,7 +428,7 @@ plugins:
# https://github.com/KaTeX/KaTeX # https://github.com/KaTeX/KaTeX
# 使用 hexo-renderer-markdown-it-plus 作为公式渲染器npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save
katex: katex:
# set <katex: true> to enable in page's front-matter enable: # true # 可以在特定文章的 front-matter 中设置 katex: true 来开启,也可以在这里设置全局开启
min_css: <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous"> min_css: <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script> min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script>
auto_render_min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script> auto_render_min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script>
@ -443,7 +443,7 @@ plugins:
# B -->|option 2| C(Section C) # B -->|option 2| C(Section C)
# ``` # ```
mermaid: mermaid:
# set <mermaid: true> to enable in page's front-matter enable: # true # 可以在特定文章的 front-matter 中设置 mermaid: true 来开启,也可以在这里设置全局开启
style_optimization: false # use custom style in stellar style_optimization: false # use custom style in stellar
# js: https://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js # js: https://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js
js: https://cdn.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js js: https://cdn.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js

View File

@ -1,3 +1,3 @@
<% if (page.katex == true) { %> <% if (page.katex == true || theme.plugins.katex.enable == true) { %>
<%- partial('katex/head') %> <%- partial('katex/head') %>
<% } %> <% } %>

View File

@ -1,9 +1,9 @@
<% if (page.katex == true) { %> <% if (page.katex == true || theme.plugins.katex.enable) { %>
<%- partial('katex/script') %> <%- partial('katex/script') %>
<% } %> <% } %>
<% if (page.mathjax == true) { %> <% if (page.mathjax == true || theme.plugins.mathjax.enable) { %>
<%- partial('mathjax/script') %> <%- partial('mathjax/script') %>
<% } %> <% } %>
<% if (page.mermaid == true) { %> <% if (page.mermaid == true || theme.plugins.mermaid.enable) { %>
<%- partial('mermaid/script') %> <%- partial('mermaid/script') %>
<% } %> <% } %>