From 1bb6eea8a84cbf67a7396abb63223f6a719aad60 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Wed, 6 Dec 2017 20:34:22 +0800 Subject: feat: allow set something for a single content * Now, you can open or close toc, copyright, reward and mathjax for a single content. * Also change the default global settings: autoCollapseToc = true -> false; mathjax = true -> false --- layouts/partials/post/copyright.html | 2 +- layouts/partials/post/reward.html | 2 +- layouts/partials/post/toc.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'layouts/partials/post') diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html index cbaefb7..8a8a350 100644 --- a/layouts/partials/post/copyright.html +++ b/layouts/partials/post/copyright.html @@ -1,4 +1,4 @@ -{{ if and .Site.Params.contentCopyright (ne .Params.contentCopyright false) }} +{{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) }} {{ $lang := .Site.Data.even.default -}}
diff --git a/layouts/partials/post/reward.html b/layouts/partials/post/reward.html index 7847454..35933ea 100644 --- a/layouts/partials/post/reward.html +++ b/layouts/partials/post/reward.html @@ -1,4 +1,4 @@ -{{ if and .Site.Params.reward.enable (ne .Params.reward false) }} +{{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) }}