From 47f3cab6a5822f00ec5d9733367f0acab3ec200b Mon Sep 17 00:00:00 2001 From: jaxleof Date: Thu, 23 Jun 2022 22:12:15 +0800 Subject: [PATCH] feat: you can use MathJax now --- README.md | 6 ++++++ layouts/partials/script.html | 40 +++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a174137..b878e63 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,12 @@ display block $$ ... $$ ![latex example](images/latex_example.png) +## Support MathJax +you can add MathJax:true to frontmatter + +``` +mathJax: true +``` ## config.toml example ```toml diff --git a/layouts/partials/script.html b/layouts/partials/script.html index d0a650e..4761086 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -1,4 +1,4 @@ - + {{ if or .Params.math .Site.Params.math }} @@ -8,3 +8,41 @@ integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"> {{ end }} +{{ if or .Params.MathJax .Site.Params.MathJax}} + + + +{{end}} \ No newline at end of file