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 -}}
{{- $lang := .Site.Data.even.default }} diff --git a/layouts/partials/post/toc.html b/layouts/partials/post/toc.html index 35e6da6..e5985c9 100644 --- a/layouts/partials/post/toc.html +++ b/layouts/partials/post/toc.html @@ -1,7 +1,7 @@ -{{ if and .Site.Params.toc (ne .Params.toc false) }} +{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }}

{{ .Site.Data.even.default.posts.toc }}

- {{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }} + {{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }}
{{.TableOfContents}}
-- cgit v1.2.3