Tweaks to structured data

This commit is contained in:
Nathan Upchurch 2024-08-23 17:33:22 -05:00
parent 5389651b27
commit 3ec15ed8e2
2 changed files with 12 additions and 4 deletions

View File

@ -5,6 +5,8 @@ export default {
language: "en",
description: "The personal website and blog of Nathan Upchurch.",
author: {
givenName: "Nathan"
familyName: "Upchurch"
name: "Nathan Upchurch",
email: "blog@upchur.ch",
url: "https://nathanupchurch.com/me",

View File

@ -3,17 +3,23 @@
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Article",
"headline": "{{ title }}",
"@type": "BlogPosting",
"articleBody": "{{ content | striptags }}"
"author": {
"@type": "Person",
"name": "{{ metadata.author.name }}"
"familyName": "{{ metadata.author.familyName }}",
"givenName": "{{ metadata.author.givenName }}",
"image": "{{ metadata.url }}{{ metadata.author.profilePic }}",
"name": "{{ metadata.author.name }}",
"url": "{{ metadata.author.url }}"
},
"datePublished": "{{ date }}",
"description": "{% if synopsis %}{{ synopsis}}{% endif %}",
"headline": "{{ title }}",
"image": "{% if imageURL %}{{ imageURL | htmlBaseUrl(metadata.url) }}{% else %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endif %}",
"inLanguage": "{{ metadata.language }}",
"name": "{{ title }}",
"url": "{{ page.url | htmlBaseUrl(metadata.url) }}",
"articleBody": "{{ content | striptags }}"
}
</script>
<!-- Open Graph -->