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,14 +21,17 @@ 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
{{- end }}" />
{{- end }}
{{- else -}}
Default, Keywords, That, Describe, Your, Page
{{- end }}" />
<!-- Canonical URLs -->
<link rel="canonical" href="{{ .Permalink }}" />

View File

@ -12,14 +12,17 @@
<!-- 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
{{- end }}" />
{{- end }}
{{- else -}}
Default, Keywords, That, Describe, Your, Page
{{- end }}" />
<!-- Canonical URLs -->
<link rel="canonical" href="{{ .Permalink }}" />