mirror of
https://github.com/jaronpate/folio.git
synced 2026-10-18 17:06:56 +00:00
update json+ld again
This commit is contained in:
+30
-1
@@ -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 },
|
||||
},
|
||||
|
||||
+37
-5
@@ -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,6 +114,8 @@ useHead({
|
||||
type: 'application/ld+json',
|
||||
innerHTML: JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@graph': [
|
||||
{
|
||||
'@type': 'ProfilePage',
|
||||
'@id': webpageId,
|
||||
url: siteUrl,
|
||||
@@ -120,22 +123,51 @@ useHead({
|
||||
description:
|
||||
'Developer. Reformed Rust enjoyer, Golang padawan.',
|
||||
inLanguage: 'en-US',
|
||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
||||
isPartOf: { '@id': websiteId },
|
||||
about: { '@id': personId },
|
||||
mainEntity: { '@id': personId },
|
||||
mentions: [
|
||||
...selectedWorks.map((work) => ({
|
||||
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 },
|
||||
},
|
||||
})),
|
||||
...projects.map((project) => ({
|
||||
'@type': 'CreativeWork',
|
||||
},
|
||||
{
|
||||
'@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',
|
||||
},
|
||||
})),
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
'@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': `${articleUrl}#article`,
|
||||
'@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(),
|
||||
inLanguage: 'en-US',
|
||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
||||
mainEntityOfPage: {
|
||||
'@type': 'WebPage',
|
||||
'@id': articleUrl,
|
||||
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,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
// const { data: pages } = await useAsyncData('writing-pages', () =>
|
||||
// queryCollection('writing').all(),
|
||||
// );
|
||||
const pages: any[] = [];
|
||||
const { data: pages } = await useAsyncData('writing-pages', () =>
|
||||
queryCollection('writing').order('date', 'DESC').all(),
|
||||
);
|
||||
|
||||
const siteUrl = 'https://jaron.sh';
|
||||
const writingUrl = `${siteUrl}/writing`;
|
||||
const personId = `${siteUrl}/#person`;
|
||||
const websiteId = `${siteUrl}/#website`;
|
||||
const collectionId = `${writingUrl}#collection`;
|
||||
const blogId = `${writingUrl}#blog`;
|
||||
|
||||
useSeoMeta({
|
||||
title: 'Writing',
|
||||
@@ -24,15 +27,66 @@ useHead({
|
||||
type: 'application/ld+json',
|
||||
innerHTML: JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@graph': [
|
||||
{
|
||||
'@type': 'CollectionPage',
|
||||
'@id': `${writingUrl}#collection`,
|
||||
'@id': collectionId,
|
||||
url: writingUrl,
|
||||
name: 'Writing',
|
||||
description:
|
||||
"Thoughts I've had here and there. Maybe you'll find something helpful or interesting here.",
|
||||
inLanguage: 'en-US',
|
||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
||||
author: { '@id': `${siteUrl}/#person` },
|
||||
isPartOf: { '@id': websiteId },
|
||||
author: { '@id': personId },
|
||||
mainEntity: { '@id': blogId },
|
||||
breadcrumb: { '@id': `${collectionId}#breadcrumb` },
|
||||
},
|
||||
{
|
||||
'@type': 'Blog',
|
||||
'@id': blogId,
|
||||
url: writingUrl,
|
||||
name: 'Jaron Pate Writing',
|
||||
description:
|
||||
"Thoughts I've had here and there. Maybe you'll find something helpful or interesting here.",
|
||||
inLanguage: 'en-US',
|
||||
isPartOf: { '@id': websiteId },
|
||||
publisher: { '@id': personId },
|
||||
blogPost: (pages.value ?? []).map((page) => ({
|
||||
'@id': `${writingUrl}/${page.path}#article`,
|
||||
})),
|
||||
},
|
||||
{
|
||||
'@type': 'ItemList',
|
||||
'@id': `${collectionId}#posts`,
|
||||
name: 'Writing by Jaron Pate',
|
||||
itemListElement: (pages.value ?? []).map(
|
||||
(page, index) => ({
|
||||
'@type': 'ListItem',
|
||||
position: index + 1,
|
||||
url: `${writingUrl}/${page.path}`,
|
||||
name: page.title,
|
||||
}),
|
||||
),
|
||||
},
|
||||
{
|
||||
'@type': 'BreadcrumbList',
|
||||
'@id': `${collectionId}#breadcrumb`,
|
||||
itemListElement: [
|
||||
{
|
||||
'@type': 'ListItem',
|
||||
position: 1,
|
||||
name: 'Home',
|
||||
item: siteUrl,
|
||||
},
|
||||
{
|
||||
'@type': 'ListItem',
|
||||
position: 2,
|
||||
name: 'Writing',
|
||||
item: writingUrl,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user