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:
parent
6c32a5ef36
commit
a7b50f1b55
@ -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",
|
||||
}}
|
||||
|
@ -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",
|
||||
}}
|
||||
|
@ -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}`,
|
||||
],
|
||||
}}
|
||||
/>
|
||||
|
@ -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",
|
||||
}}
|
||||
|
@ -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,
|
||||
|
@ -18,7 +18,6 @@ export const authorSocial = {
|
||||
github: "jakejarvis",
|
||||
twitter: "jakejarvis",
|
||||
facebook: "jakejarvis",
|
||||
keybase: "jakejarvis",
|
||||
medium: "jakejarvis",
|
||||
linkedin: "jakejarvis",
|
||||
instagram: "jakejarvis",
|
||||
|
Loading…
x
Reference in New Issue
Block a user