fix tailing comma in keyword generation

This commit is contained in:
Kim Oliver Drechsel 2022-01-17 23:42:53 +01:00
parent 39bb38be32
commit a6af6494ff
Signed by: Kim
GPG Key ID: B9D907EF02605A07
2 changed files with 18 additions and 12 deletions

View File

@ -21,13 +21,16 @@ Add automatically generated Search Engine Optimization to your Website
<!-- Meta Keywords/Tags for Users to search for in Search Engines -->
<meta name="keywords" content="
{{- with .Params.tags }}
{{- range . -}}
{{- range $key, $item := . -}}
{{- if ne $key 0 -}}
,
{{- end -}}
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
{{- .Title -}},
{{- .Title -}}
{{- end }}
{{- end }}
{{- else -}}
Tutorials, Tips, Linux, Bash, Docker
Default, Keywords, That, Describe, Your, Page
{{- end }}" />
<!-- Canonical URLs -->

View File

@ -12,13 +12,16 @@
<!-- Meta Keywords/Tags for Users to search for in Search Engines -->
<meta name="keywords" content="
{{- with .Params.tags }}
{{- range . -}}
{{- range $key, $item := . -}}
{{- if ne $key 0 -}}
,
{{- end -}}
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
{{- .Title -}},
{{- .Title -}}
{{- end }}
{{- end }}
{{- else -}}
Tutorials, Tips, Linux, Bash, Docker
Default, Keywords, That, Describe, Your, Page
{{- end }}" />
<!-- Canonical URLs -->