Support custom keywords instead of defaulting to using tags

Now can set `keywords:` in the front matter for actual keywords
This commit is contained in:
BBaoVanC 2024-01-22 20:44:54 -06:00
parent 788583ea23
commit 77afe66aa6
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -21,6 +21,9 @@
<meta itemprop="image" content="{{ $featured.Permalink }}">
{{ end }}
{{ with .Keywords }}
<meta itemprop="keywords" content="{{ delimit . ", " }}">
{{ else }}
{{ with (.GetTerms "tags") }}
{{ $tags := slice }}
{{ range . }}
@ -28,3 +31,4 @@
{{ end }}
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
{{ end }}
{{ end }}