diff --git a/layouts/partials/head/schema.html b/layouts/partials/head/schema.html
index 9cf0cca..f1a4d8c 100644
--- a/layouts/partials/head/schema.html
+++ b/layouts/partials/head/schema.html
@@ -58,7 +58,9 @@
{{- end }}
"url" : "{{ .Permalink }}",
"wordCount" : "{{ .WordCount }}",
- "genre" : [ {{ range $i, $tag := .Params.tags }}{{ if $i }}, {{ end }}"{{ $tag }}" {{ end }}]
+ {{- with $tags := .Params.tags }}
+ "genre" : [ {{ range $i, $tag := $tags }}{{ if $i }}, {{ end }}"{{ $tag }}" {{ end }}]
+ {{- end }}
}
{{ end }}