Make some page settings also configurable site wide (#182)
Adds **local** and **global** param to following front-matter vars: - hideMeta - ShowToc - TocOpen - comments Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
This commit is contained in:
parent
8222f2bd11
commit
2b3baf94bb
|
@ -8,7 +8,7 @@
|
|||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</h1>
|
||||
{{- if .Params.hideMeta }}{{ else }}
|
||||
{{- if not (.Param "hideMeta") }}
|
||||
<div class="post-meta">
|
||||
{{- if .IsTranslated -}}
|
||||
<ul class="i18n_list">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="post-description">
|
||||
{{ .Description }}
|
||||
</div>
|
||||
{{- if .Params.hideMeta }}{{ else }}
|
||||
{{- if not (.Param "hideMeta") }}
|
||||
<div class="post-meta">
|
||||
{{- partial "post_meta.html" . -}}
|
||||
{{- if .IsTranslated -}} |
|
||||
|
@ -33,9 +33,9 @@
|
|||
</header>
|
||||
{{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}}
|
||||
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
||||
{{- if .Params.ShowToc }}
|
||||
{{- if (.Param "ShowToc") }}
|
||||
<div class="toc">
|
||||
<details {{if .Params.TocOpen }} open{{ end }}>
|
||||
<details {{if (.Param "TocOpen") }} open{{ end }}>
|
||||
<summary accesskey="c" title="(Alt + C)">
|
||||
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||
</summary>
|
||||
|
@ -61,7 +61,7 @@
|
|||
{{- end }}
|
||||
</footer>
|
||||
|
||||
{{- if and ($.Site.Params.comments) (ne .Params.comments false) }}
|
||||
{{- if (.Param "comments") }}
|
||||
{{- partial "comments.html" . }}
|
||||
{{- end }}
|
||||
</article>
|
||||
|
|
Loading…
Reference in New Issue