From b1ce3af34d5fc533447552a625ea3d8fb4ddd626 Mon Sep 17 00:00:00 2001 From: Jaron Date: Sun, 28 Jun 2026 18:50:53 -0500 Subject: [PATCH] update json+ld again --- app/app.vue | 31 +++++++++++- app/pages/index.vue | 78 +++++++++++++++++++++--------- app/pages/writing/[...slug].vue | 84 +++++++++++++++++++++++++++------ app/pages/writing/index.vue | 80 ++++++++++++++++++++++++++----- 4 files changed, 221 insertions(+), 52 deletions(-) diff --git a/app/app.vue b/app/app.vue index 8df39a2..f82e114 100644 --- a/app/app.vue +++ b/app/app.vue @@ -4,6 +4,7 @@ import '~/assets/css/main.css'; const siteUrl = 'https://jaron.sh'; const personId = `${siteUrl}/#person`; const websiteId = `${siteUrl}/#website`; +const defaultImage = `${siteUrl}/favicon.png`; const jsonLd = { '@context': 'https://schema.org', @@ -12,12 +13,32 @@ const jsonLd = { '@type': 'Person', '@id': personId, name: 'Jaron Pate', + alternateName: 'jaronpate', url: siteUrl, email: 'mailto:yo@jp.wtf', + image: { + '@type': 'ImageObject', + '@id': `${siteUrl}/#person-image`, + url: defaultImage, + caption: 'Jaron Pate', + }, jobTitle: 'Software Engineer', + description: + 'Developer. Reformed Rust enjoyer, Golang padawan. Building producst in Austin, Texas.', + disambiguatingDescription: + 'Developer. Reformed Rust enjoyer, Golang padawan. Building producst in Austin, Texas.', + givenName: 'Jaron', + familyName: 'Pate', + knowsLanguage: 'en-US', homeLocation: { '@type': 'Place', name: 'Austin, TX', + address: { + '@type': 'PostalAddress', + addressLocality: 'Austin', + addressRegion: 'TX', + addressCountry: 'US', + }, }, sameAs: [ 'https://github.com/jaronpate', @@ -28,15 +49,23 @@ const jsonLd = { 'Frontend development', 'Product engineering', 'Web applications', + 'Developer tools', + 'Golang', + 'Rust', + 'TypeScript', ], + mainEntityOfPage: { '@id': websiteId }, }, { '@type': 'WebSite', '@id': websiteId, url: siteUrl, name: 'Jaron Pate', - description: 'A developer in Austin, TX.', + alternateName: 'jaron.sh', + description: + 'Developer. Reformed Rust enjoyer, Golang padawan. Building producst in Austin, Texas.', inLanguage: 'en-US', + about: { '@id': personId }, author: { '@id': personId }, publisher: { '@id': personId }, }, diff --git a/app/pages/index.vue b/app/pages/index.vue index caeae6d..b256fff 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -9,6 +9,7 @@ import { ref } from 'vue'; const siteUrl = 'https://jaron.sh'; const currentUrl = useRequestURL().href; const personId = `${siteUrl}/#person`; +const websiteId = `${siteUrl}/#website`; const webpageId = `${siteUrl}/#homepage`; useSeoMeta({ @@ -113,29 +114,60 @@ useHead({ type: 'application/ld+json', innerHTML: JSON.stringify({ '@context': 'https://schema.org', - '@type': 'ProfilePage', - '@id': webpageId, - url: siteUrl, - name: "Hey, I'm Jaron.", - description: - 'Developer. Reformed Rust enjoyer, Golang padawan.', - inLanguage: 'en-US', - isPartOf: { '@id': `${siteUrl}/#website` }, - about: { '@id': personId }, - mainEntity: { '@id': personId }, - mentions: [ - ...selectedWorks.map((work) => ({ - '@type': 'CreativeWork', - name: work.title, - description: work.description, - url: work.link, - })), - ...projects.map((project) => ({ - '@type': 'CreativeWork', - name: project.title, - description: project.description, - url: project.href, - })), + '@graph': [ + { + '@type': 'ProfilePage', + '@id': webpageId, + url: siteUrl, + name: "Hey, I'm Jaron.", + description: + 'Developer. Reformed Rust enjoyer, Golang padawan.', + inLanguage: 'en-US', + isPartOf: { '@id': websiteId }, + about: { '@id': personId }, + mainEntity: { '@id': personId }, + primaryImageOfPage: { + '@type': 'ImageObject', + url: `${siteUrl}/favicon.png`, + }, + hasPart: [ + { '@id': `${webpageId}#selected-work` }, + { '@id': `${webpageId}#projects` }, + ], + }, + { + '@type': 'ItemList', + '@id': `${webpageId}#selected-work`, + name: 'Selected work', + itemListElement: selectedWorks.map((work, index) => ({ + '@type': 'ListItem', + position: index + 1, + item: { + '@type': 'CreativeWork', + name: work.title, + description: work.description, + url: work.link, + creator: { '@id': personId }, + }, + })), + }, + { + '@type': 'ItemList', + '@id': `${webpageId}#projects`, + name: 'Projects', + itemListElement: projects.map((project, index) => ({ + '@type': 'ListItem', + position: index + 1, + item: { + '@type': 'SoftwareApplication', + name: project.title, + description: project.description, + url: project.href, + author: { '@id': personId }, + applicationCategory: 'DeveloperApplication', + }, + })), + }, ], }), }, diff --git a/app/pages/writing/[...slug].vue b/app/pages/writing/[...slug].vue index 33e4978..1953eaf 100644 --- a/app/pages/writing/[...slug].vue +++ b/app/pages/writing/[...slug].vue @@ -2,7 +2,11 @@ const route = useRoute(); const siteUrl = 'https://jaron.sh'; const personId = `${siteUrl}/#person`; +const websiteId = `${siteUrl}/#website`; const articleUrl = `${siteUrl}${route.path}`; +const webpageId = `${articleUrl}#webpage`; +const articleId = `${articleUrl}#article`; +const blogId = `${siteUrl}/writing#blog`; const { data: page } = await useAsyncData(route.path, () => { return queryCollection('writing') .path(route.path.replace('/writing/', '')) @@ -28,21 +32,71 @@ useHead({ type: 'application/ld+json', innerHTML: JSON.stringify({ '@context': 'https://schema.org', - '@type': 'BlogPosting', - '@id': `${articleUrl}#article`, - url: articleUrl, - headline: page.value.title, - description: page.value.description, - datePublished: new Date(page.value.date).toISOString(), - dateModified: new Date(page.value.date).toISOString(), - inLanguage: 'en-US', - isPartOf: { '@id': `${siteUrl}/#website` }, - mainEntityOfPage: { - '@type': 'WebPage', - '@id': articleUrl, - }, - author: { '@id': personId }, - publisher: { '@id': personId }, + '@graph': [ + { + '@type': 'WebPage', + '@id': webpageId, + url: articleUrl, + name: page.value.title, + description: page.value.description, + inLanguage: 'en-US', + isPartOf: { '@id': websiteId }, + breadcrumb: { '@id': `${articleUrl}#breadcrumb` }, + mainEntity: { '@id': articleId }, + }, + { + '@type': 'Blog', + '@id': blogId, + url: `${siteUrl}/writing`, + name: 'Jaron Pate Writing', + inLanguage: 'en-US', + isPartOf: { '@id': websiteId }, + publisher: { '@id': personId }, + }, + { + '@type': 'BlogPosting', + '@id': articleId, + url: articleUrl, + headline: page.value.title, + description: page.value.description, + datePublished: new Date(page.value.date).toISOString(), + dateModified: new Date(page.value.date).toISOString(), + image: { + '@type': 'ImageObject', + '@id': `${articleUrl}#article-image`, + url: `${siteUrl}/favicon.png`, + }, + inLanguage: 'en-US', + isPartOf: { '@id': blogId }, + mainEntityOfPage: { '@id': webpageId }, + author: { '@id': personId }, + publisher: { '@id': personId }, + }, + { + '@type': 'BreadcrumbList', + '@id': `${articleUrl}#breadcrumb`, + itemListElement: [ + { + '@type': 'ListItem', + position: 1, + name: 'Home', + item: siteUrl, + }, + { + '@type': 'ListItem', + position: 2, + name: 'Writing', + item: `${siteUrl}/writing`, + }, + { + '@type': 'ListItem', + position: 3, + name: page.value.title, + item: articleUrl, + }, + ], + }, + ], }), }, ], diff --git a/app/pages/writing/index.vue b/app/pages/writing/index.vue index f4817b7..f8f4ab2 100644 --- a/app/pages/writing/index.vue +++ b/app/pages/writing/index.vue @@ -1,11 +1,14 @@