tpl: Only show post's own keywords in schema.org - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit da72805a4304a57362e8e79a01cc145767b027c5
DIR parent 72fd871710f094e57b1888e9242216b3b36c4c88
HTML Author: Bruno Amaral <mail@brunoamaral.eu>
Date: Sat, 29 Oct 2016 11:30:59 +0100
tpl: Only show post's own keywords in schema.org
Fixes #2635
Closes #2646
Diffstat:
M tpl/tplimpl/template_embedded.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go
@@ -266,7 +266,7 @@ func (t *templateHandler) embedTemplates() {
{{ end }}{{ end }}
<!-- Output all taxonomies as schema.org keywords -->
-<meta itemprop="keywords" content="{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}" />
+<meta itemprop="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
{{ end }}`)
t.addInternalTemplate("", "google_analytics.html", `{{ with .Site.GoogleAnalytics }}