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 . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }}
{{ else }}
{{ $result = $result | append $page.Params.categories }}
{{ else with $page.Params.categories}}
{{ $result = $result | append . }}
{{ end }}
{{ with $page.GetTerms "tags" }}
{{ range . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }}
{{ else }}
{{ $result = $result | append $page.Params.tags }}
{{ else with $page.Params.tags }}
{{ $result = $result | append . }}
{{ end }}
{{ $result = delimit ($result | uniq | sort) ", " }}