1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 03:45:22 -04:00

attempted json-ld fixes...

This commit is contained in:
Jake Jarvis 2025-03-31 11:47:17 -04:00
parent 6c32a5ef36
commit a7b50f1b55
Signed by: jake
SSH Key Fingerprint: SHA256:nCkvAjYA6XaSPUqc4TfbBQTpzr8Xj7ritg/sGInCdkc
6 changed files with 26 additions and 13 deletions

View File

@ -26,8 +26,9 @@ const Page = () => {
"@type": "VideoObject",
name: metadata.title as string,
description: metadata.description as string,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
contentUrl: `${BASE_URL}${webm}`,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
embedUrl: `${BASE_URL}/birthday`,
uploadDate: "1996-02-06T00:00:00Z",
duration: "PT6M10S",
}}

View File

@ -28,8 +28,9 @@ const Page = () => {
"@type": "VideoObject",
name: metadata.title as string,
description: metadata.description as string,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
contentUrl: `${BASE_URL}${webm}`,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
embedUrl: `${BASE_URL}/hillary`,
uploadDate: "2016-07-25T00:00:00Z",
duration: "PT1M51S",
}}

View File

@ -27,6 +27,7 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
<html lang={config.siteLocale} suppressHydrationWarning>
<head>
<ThemeScript />
<JsonLd<Person>
item={{
"@context": "https://schema.org",
@ -34,18 +35,22 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
"@id": `${BASE_URL}/#person`,
name: config.authorName,
url: BASE_URL,
image: `${BASE_URL}${ogImage.src}`,
image: {
"@type": "ImageObject",
contentUrl: `${BASE_URL}${ogImage.src}`,
width: `${ogImage.width}`,
height: `${ogImage.height}`,
},
sameAs: [
BASE_URL,
`https://${config.authorSocial?.mastodon}`,
`https://github.com/${config.authorSocial?.github}`,
`https://keybase.io/${config.authorSocial?.keybase}`,
`https://bsky.app/profile/${config.authorSocial?.bluesky}`,
`https://twitter.com/${config.authorSocial?.twitter}`,
`https://medium.com/@${config.authorSocial?.medium}`,
`https://www.linkedin.com/in/${config.authorSocial?.linkedin}/`,
`https://www.facebook.com/${config.authorSocial?.facebook}`,
`https://www.instagram.com/${config.authorSocial?.instagram}/`,
`https://${config.authorSocial?.mastodon}`,
`https://bsky.app/profile/${config.authorSocial?.bluesky}`,
],
}}
/>

View File

@ -28,8 +28,9 @@ const Page = () => {
"@type": "VideoObject",
name: metadata.title as string,
description: metadata.description as string,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
contentUrl: `${BASE_URL}${webm}`,
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
embedUrl: `${BASE_URL}/leo`,
uploadDate: "2007-05-10T00:00:00Z",
duration: "PT1M48S",
}}

View File

@ -10,8 +10,9 @@ import { getSlugs, getFrontMatter } from "../../../lib/helpers/posts";
import { addMetadata } from "../../../lib/helpers/metadata";
import * as config from "../../../lib/config";
import { BASE_URL, POSTS_DIR } from "../../../lib/config/constants";
import { size as ogImageSize } from "./opengraph-image";
import type { Metadata } from "next";
import type { Article } from "schema-dts";
import type { BlogPosting } from "schema-dts";
import styles from "./page.module.css";
@ -62,15 +63,20 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
return (
<>
<JsonLd<Article>
<JsonLd<BlogPosting>
item={{
"@context": "https://schema.org",
"@type": "Article",
"@type": "BlogPosting",
headline: frontmatter!.title,
description: frontmatter!.description,
url: frontmatter!.permalink,
image: [`${BASE_URL}/${POSTS_DIR}/${frontmatter!.slug}/opengraph-image`],
keywords: frontmatter!.tags,
image: {
"@type": "ImageObject",
contentUrl: `${BASE_URL}/${POSTS_DIR}/${frontmatter!.slug}/opengraph-image`,
width: `${ogImageSize.width}`,
height: `${ogImageSize.height}`,
},
keywords: frontmatter!.tags?.join(", "),
datePublished: frontmatter!.date,
dateModified: frontmatter!.date,
inLanguage: config.siteLocale,

View File

@ -18,7 +18,6 @@ export const authorSocial = {
github: "jakejarvis",
twitter: "jakejarvis",
facebook: "jakejarvis",
keybase: "jakejarvis",
medium: "jakejarvis",
linkedin: "jakejarvis",
instagram: "jakejarvis",