Skip to content

Commit

Permalink
1049 Fix JSON header layout
Browse files Browse the repository at this point in the history
  • Loading branch information
pljones committed Oct 5, 2024
1 parent edd2563 commit 8988840
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,18 @@
{
"@context":"https://schema.org",
"@type":"BlogPosting",
"headline": "{{ page.heading }}",
{% if page.discussionurl %}
"discussionUrl": "{{ page.discussionurl }}",
{% endif %}
{% if page.author %}
"headline": "{{ page.heading }}"{% if page.discussionurl %},
"discussionUrl": "{{ page.discussionurl }}"{% endif %}{% if page.author %},
"publisher": {
"@type": "Person",
"name": "{% if site.data.authors[page.author].name %}{{ site.data.authors[page.author].name }}{% else %}{{ page.author }}{% endif %}",
{% if site.data.authors[page.author].url %}"url": "{{ site.data.authors[page.author].url }}"{% endif %}
"name": "{% if site.data.authors[page.author].name %}{{ site.data.authors[page.author].name }}{% else %}{{ page.author }}{% endif %}"{% if site.data.authors[page.author].url %},
"url": "{{ site.data.authors[page.author].url }}"{% endif %}
},
"author": {
"@type": "Person",
"name": "{% if site.data.authors[page.author].name %}{{ site.data.authors[page.author].name }}{% else %}{{ page.author }}{% endif %}",
{% if site.data.authors[page.author].url %}"url": "{{ site.data.authors[page.author].url }}"{% endif %}
},
{% endif %}
"name": "{% if site.data.authors[page.author].name %}{{ site.data.authors[page.author].name }}{% else %}{{ page.author }}{% endif %}"{% if site.data.authors[page.author].url %},
"url": "{{ site.data.authors[page.author].url }}"{% endif %}
}{% endif %},
"datePublished": "{{ page.date | date_to_xmlschema }}"
}
</script>
Expand Down

0 comments on commit 8988840

Please sign in to comment.