Skip to content

Commit

Permalink
Some structured markup tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
a-poor committed Dec 29, 2024
1 parent f0cea9a commit c1f04e0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/components/structured-meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type BlogPostMetaData = {
datePublished: string;
dateModified?: string;
author: {
'@type': 'Person';
name: string;
url: string;
};
Expand Down
13 changes: 13 additions & 0 deletions app/routes/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ export default function Page() {
Here's a picture of me after finishing the 2024 San Diego Half-Marathon.
</p>
</div>
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org",
"@type": "Person",
name: "Austin Poor",
url: "https://austinppoor.com/about",
image: "/images/austin-and-sandwich.webp",
sameAs: [
"https://github.com/a-poor",
"https://linkedin.com/in/austinpoor",
"https://bsky.app/profile/austinpoor.com",
],
})}}
/>
</>
);
}
3 changes: 2 additions & 1 deletion app/routes/blog.$slug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ export default function Page({ params }: Route.ComponentProps) {
<BlogPostMeta meta={{
headline: post?.front?.title,
image: post?.front?.image?.src,
datePublished: post?.front?.publishDate,
datePublished: new Date(post?.front?.publishDate).toISOString(),
author: {
'@type': "Person",
name: "Austin Poor",
url: "https://austinpoor.com/about",
},
Expand Down

0 comments on commit c1f04e0

Please sign in to comment.