Use same keywords for schemas as metas

This commit is contained in:
Will Faught
2025-02-14 12:28:39 -08:00
parent b36043fdd1
commit 9632f609a4
3 changed files with 29 additions and 24 deletions

View File

@@ -0,0 +1,27 @@
{{ $page := . }}
{{ $result := slice }}
{{ with $page.Keywords }}
{{ $result = . }}
{{ end }}
{{ with $page.GetTerms "categories" }}
{{ range . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }}
{{ else }}
{{ $result = $result | append $page.Params.categories }}
{{ end }}
{{ with $page.GetTerms "tags" }}
{{ range . }}
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
{{ end }}
{{ else }}
{{ $result = $result | append $page.Params.tags }}
{{ end }}
{{ $result = delimit ($result | uniq | sort) ", " }}
{{ return $result }}