diff --git a/exampleSite/content/posts/render-latex-using-katex.md b/exampleSite/content/posts/render-latex-using-katex.md index 2cd510b..fd7a926 100644 --- a/exampleSite/content/posts/render-latex-using-katex.md +++ b/exampleSite/content/posts/render-latex-using-katex.md @@ -14,6 +14,8 @@ katex = "true" +++ ``` +If you want to enable KaTeX or MathJax for all post, add `katex = ture` or `math = true` in `config.toml` in `[params]` section. + It's almost a dropin alternative to the mathjax solution,you should just choose one of them. Inline math looks like this diff --git a/layouts/partials/posts/math.html b/layouts/partials/posts/math.html index 49c07ce..93e5ce4 100644 --- a/layouts/partials/posts/math.html +++ b/layouts/partials/posts/math.html @@ -1,4 +1,4 @@ -{{- if .Params.math -}} +{{- if or (.Params.math) (.Site.Params.math) -}} @@ -17,7 +17,7 @@ }; {{- end -}} -{{- if .Params.katex -}} +{{- if or (.Params.katex) (.Site.Params.katex) -}}