diff options
author | Sebastian Pech <windows@spech.de> | 2022-01-01 12:56:34 +0300 |
---|---|---|
committer | Sebastian Pech <windows@spech.de> | 2022-01-01 12:56:34 +0300 |
commit | bd4bf12120ef68f4655e06402344e4d04d8966c9 (patch) | |
tree | 5fda2e632fa6b2af073d862c387c938a8310fa33 | |
parent | 85534ba703b45e5fd087f59c72f3816733f601d8 (diff) |
seo schema lastmod
-rw-r--r-- | layouts/partials/seo_schema.html | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/layouts/partials/seo_schema.html b/layouts/partials/seo_schema.html index 96f0751..2894642 100644 --- a/layouts/partials/seo_schema.html +++ b/layouts/partials/seo_schema.html @@ -1,24 +1,26 @@ <script type="application/ld+json"> { - "@context" : "http://schema.org", - "@type" : "BlogPosting", + "@context": "http://schema.org", + "@type": "BlogPosting", "mainEntityOfPage": { "@type": "WebPage", "@id": "{{ .Site.BaseURL }}" }, - "articleSection" : "{{ .Section }}", - "name" : "{{ .Title }}", - "headline" : "{{ .Title }}", - "description" : "{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}", - "inLanguage" : "{{ .Lang }}", - "author" : "{{ range .Site.Author }}{{ . }}{{ end }}", - "creator" : "{{ range .Site.Author }}{{ . }}{{ end }}", + "articleSection": "{{ .Section }}", + "name": "{{ .Title }}", + "headline": "{{ .Title }}", + "description": "{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}", + "inLanguage": "{{ .Lang }}", + "author": "{{ range .Site.Author }}{{ . }}{{ end }}", + "creator": "{{ range .Site.Author }}{{ . }}{{ end }}", "publisher": "{{ range .Site.Author }}{{ . }}{{ end }}", - "accountablePerson" : "{{ range .Site.Author }}{{ . }}{{ end }}", - "copyrightHolder" : "{{ range .Site.Author }}{{ . }}{{ end }}", - "copyrightYear" : "{{ .Date.Format "2006" }}", + "accountablePerson": "{{ range .Site.Author }}{{ . }}{{ end }}", + "copyrightHolder": "{{ range .Site.Author }}{{ . }}{{ end }}", + "copyrightYear": "{{ .Date.Format "2006" }}", "datePublished": "{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}", - "dateModified" : "{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}", + {{ with .Lastmod -}} + "dateModified": "{{ .UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}", + {{- end }} "url" : "{{ .RelPermalink }}", "wordCount" : "{{ .WordCount }}", "keywords" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}"{{ . }}",{{ end }}{{ end }}"Blog" ] |