diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 0196911..01586a8 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -1,17 +1,21 @@ --- import { WEBMENTION_PINGBACK, WEBMENTION_URL } from "astro:env/client"; -import { siteConfig } from "@/site.config"; +import { siteConfig, socialLinks } from "@/site.config"; import type { SiteMeta } from "@/types"; import "@/styles/global.css"; type Props = SiteMeta; -const { articleDate, description, ogImage, title } = Astro.props; +const { articleDate, description, keywords, ogImage, schema, title } = Astro.props; const titleSeparator = "•"; const siteTitle = `${title} ${titleSeparator} ${siteConfig.title}`; const canonicalURL = new URL(Astro.url.pathname, Astro.site); const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url).href; + +const xLink = socialLinks.find((s) => s.friendlyName === "X")?.link; +const twitterHandle = xLink ? `@${xLink.split("/").pop()}` : undefined; +const schemas = schema ? (Array.isArray(schema) ? schema : [schema]) : []; --- @@ -38,8 +42,15 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url {/* Primary Meta Tags */} +{keywords && keywords.length > 0 && } +{/* Tell crawlers to index and allow full image/snippet/video previews */} + + {/* Open Graph / Facebook */} @@ -48,6 +59,7 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url + { @@ -65,6 +77,11 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url +{twitterHandle && } +{twitterHandle && } + +{/* Structured data (schema.org JSON-LD) */} +{schemas.map((s) => )} {/* Sitemap */} diff --git a/src/components/StreamPlayer.astro b/src/components/StreamPlayer.astro deleted file mode 100644 index 3b06e7b..0000000 --- a/src/components/StreamPlayer.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import { streamOrigin } from "@/site.config"; - -interface Props { - videoId: string; - title?: string; -} - -const { videoId, title } = Astro.props; ---- - -
{post.data.description}} diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index 35df90a..29445c9 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -11,6 +11,7 @@ const year = new Date().getFullYear(); {/* Row 1: site nav */}