feat(seo): site meta composable + Open Graph image generation
Adds `useSiteMeta()` composable that wraps useSeoMeta with site defaults (title template, canonical URL, og/twitter image, og:site_name) and absolute-URL handling via runtimeConfig.public.appUrl. Adds /og/events/[slug].png route that renders per-event OG images via satori + @resvg/resvg-js, cached on disk by slug + updatedAt. Bundles Brygada 1918 + Commit Mono fonts as server assets, ships a fallback default.png, and patches @shuding/opentype.js via patch-package. Converts ~25 pages from useHead to useSiteMeta and adds noindex on private/auth/admin pages.
This commit is contained in:
parent
877ef1a220
commit
31144617d7
36 changed files with 1182 additions and 53 deletions
|
|
@ -117,6 +117,33 @@ definePageMeta({
|
|||
layout: "default",
|
||||
});
|
||||
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const siteUrl = (runtimeConfig.public.appUrl || "").replace(/\/$/, "");
|
||||
|
||||
useSiteMeta({
|
||||
title: "Ghost Guild",
|
||||
bareTitle: true,
|
||||
description:
|
||||
"Ghost Guild is where game developers explore cooperative models. Membership, events, and resources for people figuring it out together. Pay what you can.",
|
||||
});
|
||||
|
||||
useHead({
|
||||
script: [
|
||||
{
|
||||
type: "application/ld+json",
|
||||
innerHTML: JSON.stringify({
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
name: "Ghost Guild",
|
||||
url: siteUrl || "https://ghostguild.org",
|
||||
logo: `${siteUrl || "https://ghostguild.org"}/og/default.png`,
|
||||
description:
|
||||
"A membership community for game developers exploring cooperative models. A program of Baby Ghosts, a Canadian non-profit.",
|
||||
}),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const { data: events } = await useFetch("/api/events", {
|
||||
query: { limit: 4, upcoming: true },
|
||||
default: () => [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue