Add Open Graph and Twitter Card metadata for social sharing

- Add og-image.jpg (1200x630) for link previews
- Add metadataBase, openGraph, and twitter metadata to layout.tsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2025-12-22 22:11:34 +01:00
parent c3b92740b5
commit 0f683d08fb
2 changed files with 23 additions and 14 deletions

View File

@ -1,7 +1,6 @@
import type React from "react"
import type { Metadata } from "next"
import { Inter, JetBrains_Mono } from "next/font/google"
import { Analytics } from "@vercel/analytics/next"
import "./globals.css"
const inter = Inter({
@ -14,26 +13,37 @@ const jetBrainsMono = JetBrains_Mono({
})
export const metadata: Metadata = {
metadataBase: new URL("https://crypto-commons.org"),
title: "Crypto Commons Association",
description:
"Actively promoting the development of digital common goods and infrastructure in distributed ledger technology",
generator: "v0.app",
icons: {
icon: [
{
url: "/icon-light-32x32.png",
media: "(prefers-color-scheme: light)",
icon: "data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌐</text></svg>",
},
openGraph: {
title: "Crypto Commons Association",
description:
"Actively promoting the development of digital common goods and infrastructure in distributed ledger technology",
url: "https://crypto-commons.org",
siteName: "Crypto Commons Association",
images: [
{
url: "/icon-dark-32x32.png",
media: "(prefers-color-scheme: dark)",
},
{
url: "/icon.svg",
type: "image/svg+xml",
url: "/og-image.jpg",
width: 1200,
height: 630,
alt: "Crypto Commons Association",
},
],
apple: "/apple-icon.png",
locale: "en_US",
type: "website",
},
twitter: {
card: "summary_large_image",
title: "Crypto Commons Association",
description:
"Actively promoting the development of digital common goods and infrastructure in distributed ledger technology",
images: ["/og-image.jpg"],
},
}
@ -46,7 +56,6 @@ export default function RootLayout({
<html lang="en">
<body className={`${inter.variable} ${jetBrainsMono.variable} font-sans antialiased`}>
{children}
<Analytics />
</body>
</html>
)

BIN
public/og-image.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB