Check for unset categories, tags params

This commit is contained in:
Will Faught
2025-03-02 12:18:36 -08:00
parent 4dbb414ac3
commit 7050277e4b

View File

@@ -10,16 +10,16 @@
{{ range . }} {{ range . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }} {{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }} {{ end }}
{{ else }} {{ else with $page.Params.categories}}
{{ $result = $result | append $page.Params.categories }} {{ $result = $result | append . }}
{{ end }} {{ end }}
{{ with $page.GetTerms "tags" }} {{ with $page.GetTerms "tags" }}
{{ range . }} {{ range . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }} {{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }} {{ end }}
{{ else }} {{ else with $page.Params.tags }}
{{ $result = $result | append $page.Params.tags }} {{ $result = $result | append . }}
{{ end }} {{ end }}
{{ $result = delimit ($result | uniq | sort) ", " }} {{ $result = delimit ($result | uniq | sort) ", " }}