hugo-theme-relearn/layouts/partials/shortcodes/pages.html
Sören Weber bed830f385
docs: make releasenotes page immutable #917
content of the releasenotes page is solely controlled by the `hidden` front matter value of each version subpage
2024-10-11 16:46:43 +02:00

35 lines
No EOL
1.1 KiB
HTML

{{- $showtitle := .showtitle | default false }}
{{- if eq (printf "%T" $showtitle) "string" }}
{{- $showtitle = (eq $showtitle "true") }}
{{- end }}
{{- $showdivider := .showdivider | default false }}
{{- if eq (printf "%T" $showdivider) "string" }}
{{- $showdivider = (eq $showdivider "true") }}
{{- end }}
{{- $showhidden := .showhidden | default false }}
{{- if eq (printf "%T" $showhidden) "string" }}
{{- $showhidden = (eq $showhidden "true") }}
{{- end }}
{{- $hidevisible := .hidevisible | default false }}
{{- if eq (printf "%T" $hidevisible) "string" }}
{{- $hidevisible = (eq $hidevisible "true") }}
{{- end }}
{{- $pages := partialCached "_relearn/pages.gotmpl" (dict "page" .page) }}
{{- $needsdivider := false }}
{{- range $pages }}
{{- $display := or
(and $.showhidden (or .Params.hidden (eq .Title "")) )
(and (not $.hidevisible) (not (or .Params.hidden (eq .Title ""))) )
}}
{{- if $display }}
{{ if and $.showdivider $needsdivider }}
---
{{ end }}
{{ if and $.showtitle .Title }}
# {{ .Title }}
{{ end }}
{{ .RenderShortcodes }}
{{ end }}
{{- $needsdivider = true }}
{{- end }}