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 siteUrl = 'https://jaron.sh';
|
||||||
const personId = `${siteUrl}/#person`;
|
const personId = `${siteUrl}/#person`;
|
||||||
const websiteId = `${siteUrl}/#website`;
|
const websiteId = `${siteUrl}/#website`;
|
||||||
|
const defaultImage = `${siteUrl}/favicon.png`;
|
||||||
|
|
||||||
const jsonLd = {
|
const jsonLd = {
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
@@ -12,12 +13,32 @@ const jsonLd = {
|
|||||||
'@type': 'Person',
|
'@type': 'Person',
|
||||||
'@id': personId,
|
'@id': personId,
|
||||||
name: 'Jaron Pate',
|
name: 'Jaron Pate',
|
||||||
|
alternateName: 'jaronpate',
|
||||||
url: siteUrl,
|
url: siteUrl,
|
||||||
email: 'mailto:yo@jp.wtf',
|
email: 'mailto:yo@jp.wtf',
|
||||||
|
image: {
|
||||||
|
'@type': 'ImageObject',
|
||||||
|
'@id': `${siteUrl}/#person-image`,
|
||||||
|
url: defaultImage,
|
||||||
|
caption: 'Jaron Pate',
|
||||||
|
},
|
||||||
jobTitle: 'Software Engineer',
|
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: {
|
homeLocation: {
|
||||||
'@type': 'Place',
|
'@type': 'Place',
|
||||||
name: 'Austin, TX',
|
name: 'Austin, TX',
|
||||||
|
address: {
|
||||||
|
'@type': 'PostalAddress',
|
||||||
|
addressLocality: 'Austin',
|
||||||
|
addressRegion: 'TX',
|
||||||
|
addressCountry: 'US',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
sameAs: [
|
sameAs: [
|
||||||
'https://github.com/jaronpate',
|
'https://github.com/jaronpate',
|
||||||
@@ -28,15 +49,23 @@ const jsonLd = {
|
|||||||
'Frontend development',
|
'Frontend development',
|
||||||
'Product engineering',
|
'Product engineering',
|
||||||
'Web applications',
|
'Web applications',
|
||||||
|
'Developer tools',
|
||||||
|
'Golang',
|
||||||
|
'Rust',
|
||||||
|
'TypeScript',
|
||||||
],
|
],
|
||||||
|
mainEntityOfPage: { '@id': websiteId },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'@type': 'WebSite',
|
'@type': 'WebSite',
|
||||||
'@id': websiteId,
|
'@id': websiteId,
|
||||||
url: siteUrl,
|
url: siteUrl,
|
||||||
name: 'Jaron Pate',
|
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',
|
inLanguage: 'en-US',
|
||||||
|
about: { '@id': personId },
|
||||||
author: { '@id': personId },
|
author: { '@id': personId },
|
||||||
publisher: { '@id': personId },
|
publisher: { '@id': personId },
|
||||||
},
|
},
|
||||||
|
|||||||
+55
-23
@@ -9,6 +9,7 @@ import { ref } from 'vue';
|
|||||||
const siteUrl = 'https://jaron.sh';
|
const siteUrl = 'https://jaron.sh';
|
||||||
const currentUrl = useRequestURL().href;
|
const currentUrl = useRequestURL().href;
|
||||||
const personId = `${siteUrl}/#person`;
|
const personId = `${siteUrl}/#person`;
|
||||||
|
const websiteId = `${siteUrl}/#website`;
|
||||||
const webpageId = `${siteUrl}/#homepage`;
|
const webpageId = `${siteUrl}/#homepage`;
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
@@ -113,29 +114,60 @@ useHead({
|
|||||||
type: 'application/ld+json',
|
type: 'application/ld+json',
|
||||||
innerHTML: JSON.stringify({
|
innerHTML: JSON.stringify({
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
'@type': 'ProfilePage',
|
'@graph': [
|
||||||
'@id': webpageId,
|
{
|
||||||
url: siteUrl,
|
'@type': 'ProfilePage',
|
||||||
name: "Hey, I'm Jaron.",
|
'@id': webpageId,
|
||||||
description:
|
url: siteUrl,
|
||||||
'Developer. Reformed Rust enjoyer, Golang padawan.',
|
name: "Hey, I'm Jaron.",
|
||||||
inLanguage: 'en-US',
|
description:
|
||||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
'Developer. Reformed Rust enjoyer, Golang padawan.',
|
||||||
about: { '@id': personId },
|
inLanguage: 'en-US',
|
||||||
mainEntity: { '@id': personId },
|
isPartOf: { '@id': websiteId },
|
||||||
mentions: [
|
about: { '@id': personId },
|
||||||
...selectedWorks.map((work) => ({
|
mainEntity: { '@id': personId },
|
||||||
'@type': 'CreativeWork',
|
primaryImageOfPage: {
|
||||||
name: work.title,
|
'@type': 'ImageObject',
|
||||||
description: work.description,
|
url: `${siteUrl}/favicon.png`,
|
||||||
url: work.link,
|
},
|
||||||
})),
|
hasPart: [
|
||||||
...projects.map((project) => ({
|
{ '@id': `${webpageId}#selected-work` },
|
||||||
'@type': 'CreativeWork',
|
{ '@id': `${webpageId}#projects` },
|
||||||
name: project.title,
|
],
|
||||||
description: project.description,
|
},
|
||||||
url: project.href,
|
{
|
||||||
})),
|
'@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',
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const siteUrl = 'https://jaron.sh';
|
const siteUrl = 'https://jaron.sh';
|
||||||
const personId = `${siteUrl}/#person`;
|
const personId = `${siteUrl}/#person`;
|
||||||
|
const websiteId = `${siteUrl}/#website`;
|
||||||
const articleUrl = `${siteUrl}${route.path}`;
|
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, () => {
|
const { data: page } = await useAsyncData(route.path, () => {
|
||||||
return queryCollection('writing')
|
return queryCollection('writing')
|
||||||
.path(route.path.replace('/writing/', ''))
|
.path(route.path.replace('/writing/', ''))
|
||||||
@@ -28,21 +32,71 @@ useHead({
|
|||||||
type: 'application/ld+json',
|
type: 'application/ld+json',
|
||||||
innerHTML: JSON.stringify({
|
innerHTML: JSON.stringify({
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
'@type': 'BlogPosting',
|
'@graph': [
|
||||||
'@id': `${articleUrl}#article`,
|
{
|
||||||
url: articleUrl,
|
'@type': 'WebPage',
|
||||||
headline: page.value.title,
|
'@id': webpageId,
|
||||||
description: page.value.description,
|
url: articleUrl,
|
||||||
datePublished: new Date(page.value.date).toISOString(),
|
name: page.value.title,
|
||||||
dateModified: new Date(page.value.date).toISOString(),
|
description: page.value.description,
|
||||||
inLanguage: 'en-US',
|
inLanguage: 'en-US',
|
||||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
isPartOf: { '@id': websiteId },
|
||||||
mainEntityOfPage: {
|
breadcrumb: { '@id': `${articleUrl}#breadcrumb` },
|
||||||
'@type': 'WebPage',
|
mainEntity: { '@id': articleId },
|
||||||
'@id': articleUrl,
|
},
|
||||||
},
|
{
|
||||||
author: { '@id': personId },
|
'@type': 'Blog',
|
||||||
publisher: { '@id': personId },
|
'@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,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
+67
-13
@@ -1,11 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// const { data: pages } = await useAsyncData('writing-pages', () =>
|
const { data: pages } = await useAsyncData('writing-pages', () =>
|
||||||
// queryCollection('writing').all(),
|
queryCollection('writing').order('date', 'DESC').all(),
|
||||||
// );
|
);
|
||||||
const pages: any[] = [];
|
|
||||||
|
|
||||||
const siteUrl = 'https://jaron.sh';
|
const siteUrl = 'https://jaron.sh';
|
||||||
const writingUrl = `${siteUrl}/writing`;
|
const writingUrl = `${siteUrl}/writing`;
|
||||||
|
const personId = `${siteUrl}/#person`;
|
||||||
|
const websiteId = `${siteUrl}/#website`;
|
||||||
|
const collectionId = `${writingUrl}#collection`;
|
||||||
|
const blogId = `${writingUrl}#blog`;
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: 'Writing',
|
title: 'Writing',
|
||||||
@@ -24,15 +27,66 @@ useHead({
|
|||||||
type: 'application/ld+json',
|
type: 'application/ld+json',
|
||||||
innerHTML: JSON.stringify({
|
innerHTML: JSON.stringify({
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
'@type': 'CollectionPage',
|
'@graph': [
|
||||||
'@id': `${writingUrl}#collection`,
|
{
|
||||||
url: writingUrl,
|
'@type': 'CollectionPage',
|
||||||
name: 'Writing',
|
'@id': collectionId,
|
||||||
description:
|
url: writingUrl,
|
||||||
"Thoughts I've had here and there. Maybe you'll find something helpful or interesting here.",
|
name: 'Writing',
|
||||||
inLanguage: 'en-US',
|
description:
|
||||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
"Thoughts I've had here and there. Maybe you'll find something helpful or interesting here.",
|
||||||
author: { '@id': `${siteUrl}/#person` },
|
inLanguage: 'en-US',
|
||||||
|
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