From 4d672b89071f1b858879073034b61f9b5fbe8a97 Mon Sep 17 00:00:00 2001 From: vvveiii Date: Sun, 27 Oct 2019 20:16:58 +0800 Subject: add variable enableMathJax fix hugo build error: execute of template failed: template: index.html:32:22: executing "main" at <.RelPermalink>: can't evaluate field RelPermalink in type *page.Pager. --- layouts/_default/baseof.html | 3 ++- layouts/index.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e62a374..d6ceffd 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -72,10 +72,11 @@ - + {{ if .Site.Params.enableMathJax }} + {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 6ae1362..56ae4df 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -34,7 +34,7 @@ {{ end }} {{ range .Paginator.Pagers }} - + {{ .PageNumber }} {{ end }} -- cgit v1.2.3 From 2e1e35a46e8e9f955a044a58bae93a89ac05cee6 Mon Sep 17 00:00:00 2001 From: qqhann Date: Sun, 1 Dec 2019 01:02:54 +0900 Subject: Update: default true math option --- README.md | 2 ++ layouts/_default/baseof.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4455fbc..dfc2ee6 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ twitter = "your_twitter_id" # You can use favicon by addin them manually. useIcon = true useTwitterCard = true +# Use MathJax.js. Disabling site-wide and you still can enable in indivisual pages +math = true shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"] showFooterCredits = true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d6ceffd..a1bc923 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -72,7 +72,7 @@ - {{ if .Site.Params.enableMathJax }} + {{ if or .Params.math ( default true .Site.Params.math ) }} -- cgit v1.2.3