Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBruno Amaral <mail@brunoamaral.eu>2016-10-29 13:30:59 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-06-28 22:26:18 +0300
commitda72805a4304a57362e8e79a01cc145767b027c5 (patch)
treee8984b0d3924f33a3227bb9dc5890c2276fbdfbf /tpl
parent72fd871710f094e57b1888e9242216b3b36c4c88 (diff)
tpl: Only show post's own keywords in schema.org
Fixes #2635 Closes #2646
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template_embedded.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go
index 7629cc764..4c7113ae3 100644
--- 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 }}