diff --git a/CHANGELOG.md b/CHANGELOG.md index 32aed3f0..0c7c2542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - `lead` shortcode not rendering Markdown formatted text ([#73](https://github.com/jpanther/congo/issues/73)) +- JSON-LD keywords data not structured correctly ([#74](https://github.com/jpanther/congo/issues/74)) ## [1.6.1] - 2021-12-31 diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html index 1cab618a..6cf9c774 100644 --- a/layouts/partials/schema.html +++ b/layouts/partials/schema.html @@ -17,7 +17,7 @@ "articleSection": "{{ (site.GetPage .Section).Title }}", "name": "{{ .Title | safeJS }}", "headline": "{{ .Title | safeJS }}", - "description": "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}", + "description": "{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}", {{ with .Site.LanguageCode }}"inLanguage": {{ . }},{{ end }} "author" : { "@type": "Person", @@ -33,8 +33,8 @@ {{ with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }} {{ with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }} "url" : "{{ .Permalink }}", - "wordCount": "{{ .WordCount }}", - "keywords": [{{ 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 }}] + {{ with .Params.tags }}"keywords": {{ . }},{{ end }} + "wordCount": "{{ .WordCount }}" } {{ end }}