diff options
author | Humberto Rocha <humrochagf@gmail.com> | 2019-07-31 20:06:12 +0300 |
---|---|---|
committer | Humberto Rocha <humrochagf@gmail.com> | 2019-07-31 20:06:12 +0300 |
commit | f5742c3b9b14e90a2ebf9da16027599002b19162 (patch) | |
tree | fbcc2bf748472b7cde6bdb65ac721d781ea76d49 /layouts/partials/blog-post-jsonld.html | |
parent | d4a7d199b25eea58aa71492d2f708d36de04ae2e (diff) |
Add blog json-ld
Diffstat (limited to 'layouts/partials/blog-post-jsonld.html')
-rw-r--r-- | layouts/partials/blog-post-jsonld.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/blog-post-jsonld.html b/layouts/partials/blog-post-jsonld.html new file mode 100644 index 0000000..5cfe8b2 --- /dev/null +++ b/layouts/partials/blog-post-jsonld.html @@ -0,0 +1,22 @@ +{ + "@context": "http://schema.org", + "@type": "BlogPosting", + "headline": "{{ .Title }}", + "url": "{{ .Permalink }}", + "datePublished": "{{ .PublishDate.Format "2006-01-02" }}", + "image": { + "@type": "ImageObject", + {{ if .Params.shareImage }} + "url": "{{ .Params.shareImage | absURL }}" + {{ else }} + "url": "{{ .Site.Params.siteLogo | absURL }}" + {{ end }} + }, + "author": { + "@type": "Person", + "name": "{{ .Site.Params.author.name }}", + {{ with .Site.GetPage "/about" }} + "url": "{{ .Permalink }}" + {{ end }} + } +} |