Add config to hide page data

This commit is contained in:
Will Faught
2023-01-28 18:24:59 -08:00
parent a2b36a4208
commit 388b7d757a
5 changed files with 24 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
{{ if .Title }}
{{ $class := .Param "paige.page.title_class" | default "display-5 fw-bold text-center" }}
{{ $title := .Title | markdownify }}
{{ $class := .Param "paige.page.title_class" | default "display-5 fw-bold text-center" }}
{{ $title := cond (.Param "paige.page.hide_title" | not | not) "" (.Title | markdownify) }}
{{ if $title }}
<h1 class="{{ $class }}">{{ if .Params.link }}<a href="{{ .Params.link }}">{{ $title }}</a>{{ else }}{{ $title }}{{ end }}{{ if .Scratch.Get "paige_show_full_pages" }}<a aria-label="Link to this section" class="paige-header-link" href="{{ .RelPermalink }}">#</a>{{ end }}</h1>
{{ end }}