mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 14:08:29 -04:00
attempted json-ld fixes...
This commit is contained in:
parent
6c32a5ef36
commit
a7b50f1b55
@ -26,8 +26,9 @@ const Page = () => {
|
|||||||
"@type": "VideoObject",
|
"@type": "VideoObject",
|
||||||
name: metadata.title as string,
|
name: metadata.title as string,
|
||||||
description: metadata.description as string,
|
description: metadata.description as string,
|
||||||
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
|
||||||
contentUrl: `${BASE_URL}${webm}`,
|
contentUrl: `${BASE_URL}${webm}`,
|
||||||
|
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
||||||
|
embedUrl: `${BASE_URL}/birthday`,
|
||||||
uploadDate: "1996-02-06T00:00:00Z",
|
uploadDate: "1996-02-06T00:00:00Z",
|
||||||
duration: "PT6M10S",
|
duration: "PT6M10S",
|
||||||
}}
|
}}
|
||||||
|
@ -28,8 +28,9 @@ const Page = () => {
|
|||||||
"@type": "VideoObject",
|
"@type": "VideoObject",
|
||||||
name: metadata.title as string,
|
name: metadata.title as string,
|
||||||
description: metadata.description as string,
|
description: metadata.description as string,
|
||||||
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
|
||||||
contentUrl: `${BASE_URL}${webm}`,
|
contentUrl: `${BASE_URL}${webm}`,
|
||||||
|
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
||||||
|
embedUrl: `${BASE_URL}/hillary`,
|
||||||
uploadDate: "2016-07-25T00:00:00Z",
|
uploadDate: "2016-07-25T00:00:00Z",
|
||||||
duration: "PT1M51S",
|
duration: "PT1M51S",
|
||||||
}}
|
}}
|
||||||
|
@ -27,6 +27,7 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
|||||||
<html lang={config.siteLocale} suppressHydrationWarning>
|
<html lang={config.siteLocale} suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
<ThemeScript />
|
<ThemeScript />
|
||||||
|
|
||||||
<JsonLd<Person>
|
<JsonLd<Person>
|
||||||
item={{
|
item={{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
@ -34,18 +35,22 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
|||||||
"@id": `${BASE_URL}/#person`,
|
"@id": `${BASE_URL}/#person`,
|
||||||
name: config.authorName,
|
name: config.authorName,
|
||||||
url: BASE_URL,
|
url: BASE_URL,
|
||||||
image: `${BASE_URL}${ogImage.src}`,
|
image: {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
contentUrl: `${BASE_URL}${ogImage.src}`,
|
||||||
|
width: `${ogImage.width}`,
|
||||||
|
height: `${ogImage.height}`,
|
||||||
|
},
|
||||||
sameAs: [
|
sameAs: [
|
||||||
BASE_URL,
|
BASE_URL,
|
||||||
|
`https://${config.authorSocial?.mastodon}`,
|
||||||
`https://github.com/${config.authorSocial?.github}`,
|
`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://twitter.com/${config.authorSocial?.twitter}`,
|
||||||
`https://medium.com/@${config.authorSocial?.medium}`,
|
`https://medium.com/@${config.authorSocial?.medium}`,
|
||||||
`https://www.linkedin.com/in/${config.authorSocial?.linkedin}/`,
|
`https://www.linkedin.com/in/${config.authorSocial?.linkedin}/`,
|
||||||
`https://www.facebook.com/${config.authorSocial?.facebook}`,
|
`https://www.facebook.com/${config.authorSocial?.facebook}`,
|
||||||
`https://www.instagram.com/${config.authorSocial?.instagram}/`,
|
`https://www.instagram.com/${config.authorSocial?.instagram}/`,
|
||||||
`https://${config.authorSocial?.mastodon}`,
|
|
||||||
`https://bsky.app/profile/${config.authorSocial?.bluesky}`,
|
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -28,8 +28,9 @@ const Page = () => {
|
|||||||
"@type": "VideoObject",
|
"@type": "VideoObject",
|
||||||
name: metadata.title as string,
|
name: metadata.title as string,
|
||||||
description: metadata.description as string,
|
description: metadata.description as string,
|
||||||
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
|
||||||
contentUrl: `${BASE_URL}${webm}`,
|
contentUrl: `${BASE_URL}${webm}`,
|
||||||
|
thumbnailUrl: `${BASE_URL}${thumbnail.src}`,
|
||||||
|
embedUrl: `${BASE_URL}/leo`,
|
||||||
uploadDate: "2007-05-10T00:00:00Z",
|
uploadDate: "2007-05-10T00:00:00Z",
|
||||||
duration: "PT1M48S",
|
duration: "PT1M48S",
|
||||||
}}
|
}}
|
||||||
|
@ -10,8 +10,9 @@ import { getSlugs, getFrontMatter } from "../../../lib/helpers/posts";
|
|||||||
import { addMetadata } from "../../../lib/helpers/metadata";
|
import { addMetadata } from "../../../lib/helpers/metadata";
|
||||||
import * as config from "../../../lib/config";
|
import * as config from "../../../lib/config";
|
||||||
import { BASE_URL, POSTS_DIR } from "../../../lib/config/constants";
|
import { BASE_URL, POSTS_DIR } from "../../../lib/config/constants";
|
||||||
|
import { size as ogImageSize } from "./opengraph-image";
|
||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import type { Article } from "schema-dts";
|
import type { BlogPosting } from "schema-dts";
|
||||||
|
|
||||||
import styles from "./page.module.css";
|
import styles from "./page.module.css";
|
||||||
|
|
||||||
@ -62,15 +63,20 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<JsonLd<Article>
|
<JsonLd<BlogPosting>
|
||||||
item={{
|
item={{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "Article",
|
"@type": "BlogPosting",
|
||||||
headline: frontmatter!.title,
|
headline: frontmatter!.title,
|
||||||
description: frontmatter!.description,
|
description: frontmatter!.description,
|
||||||
url: frontmatter!.permalink,
|
url: frontmatter!.permalink,
|
||||||
image: [`${BASE_URL}/${POSTS_DIR}/${frontmatter!.slug}/opengraph-image`],
|
image: {
|
||||||
keywords: frontmatter!.tags,
|
"@type": "ImageObject",
|
||||||
|
contentUrl: `${BASE_URL}/${POSTS_DIR}/${frontmatter!.slug}/opengraph-image`,
|
||||||
|
width: `${ogImageSize.width}`,
|
||||||
|
height: `${ogImageSize.height}`,
|
||||||
|
},
|
||||||
|
keywords: frontmatter!.tags?.join(", "),
|
||||||
datePublished: frontmatter!.date,
|
datePublished: frontmatter!.date,
|
||||||
dateModified: frontmatter!.date,
|
dateModified: frontmatter!.date,
|
||||||
inLanguage: config.siteLocale,
|
inLanguage: config.siteLocale,
|
||||||
|
@ -18,7 +18,6 @@ export const authorSocial = {
|
|||||||
github: "jakejarvis",
|
github: "jakejarvis",
|
||||||
twitter: "jakejarvis",
|
twitter: "jakejarvis",
|
||||||
facebook: "jakejarvis",
|
facebook: "jakejarvis",
|
||||||
keybase: "jakejarvis",
|
|
||||||
medium: "jakejarvis",
|
medium: "jakejarvis",
|
||||||
linkedin: "jakejarvis",
|
linkedin: "jakejarvis",
|
||||||
instagram: "jakejarvis",
|
instagram: "jakejarvis",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user