From 0699e5f8dee3f775b363359e8f74c0ead8e3e730 Mon Sep 17 00:00:00 2001 From: Gregas Maximus Date: Fri, 20 Jan 2017 13:28:04 -0800 Subject: Option to disable MathJax but enabled by default --- README.md | 2 +- exampleSite/config.toml | 2 +- layouts/partials/footer_js.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a03def..6ff6e45 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Mathematical equations in form of LaTeX or MathML code can be rendered with the You can also print formulas inline. In this case wrap the formula only once with `$`. -If you don't need equations, you can disable MathJax but putting `mathjax = false` in your config.toml. This will prevent clients from unnecessarily downloading the MathJax library. +If you don't need equations, you can disable MathJax but putting `disable_mathjax = true` in your config.toml. This will prevent clients from unnecessarily downloading the MathJax library. ## Shortcodes diff --git a/exampleSite/config.toml b/exampleSite/config.toml index c299ded..de3ee8e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -24,7 +24,7 @@ theme = "hugo-icarus-theme" copyright = "Powered by [Hugo](//gohugo.io). Theme by [PPOffice](http://github.com/ppoffice)." avatar = "css/images/avatar.png" logo = "css/images/logo.png" - mathjax = true # set to false to disable MathJax + disable_mathjax = false # set to true to disable MathJax # Format dates with Go's time formatting date_format = "2006-01-02" diff --git a/layouts/partials/footer_js.html b/layouts/partials/footer_js.html index e3abb52..7887047 100644 --- a/layouts/partials/footer_js.html +++ b/layouts/partials/footer_js.html @@ -8,7 +8,7 @@ {{ end }} -{{ if .Site.Params.mathjax }} +{{ if not .Site.Params.disable_mathjax }}