diff options
Diffstat (limited to 'layouts/partials/blog-jsonld.html')
-rw-r--r-- | layouts/partials/blog-jsonld.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/blog-jsonld.html b/layouts/partials/blog-jsonld.html new file mode 100644 index 0000000..04e438f --- /dev/null +++ b/layouts/partials/blog-jsonld.html @@ -0,0 +1,22 @@ +{ + "@context": "http://schema.org", + "@type": "Blog", + "author": { + "@type": "Person", + "name": "{{ .Site.Params.author.name }}", + {{ with .Site.GetPage "/about" }} + "url": "{{ .Permalink }}" + {{ end }} + }, + "blogPost": [ + {{ range $index, $page := .Pages }} + {{ if $index }},{{ end }} + { + "@type": "BlogPosting", + "headline": "{{ $page.Title }}", + "url": "{{ $page.Permalink }}", + "datePublished": "{{ $page.PublishDate.Format "2006-01-02" }}" + } + {{ end }} + ] +} |