mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
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:
parent
788583ea23
commit
77afe66aa6
@ -21,10 +21,14 @@
|
|||||||
<meta itemprop="image" content="{{ $featured.Permalink }}">
|
<meta itemprop="image" content="{{ $featured.Permalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with (.GetTerms "tags") }}
|
{{ with .Keywords }}
|
||||||
|
<meta itemprop="keywords" content="{{ delimit . ", " }}">
|
||||||
|
{{ else }}
|
||||||
|
{{ with (.GetTerms "tags") }}
|
||||||
{{ $tags := slice }}
|
{{ $tags := slice }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ $tags = $tags | append .LinkTitle }}
|
{{ $tags = $tags | append .LinkTitle }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
|
<meta itemprop="keywords" content="{{ delimit $tags ", " }}">
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user