blog.hangerthem.com/app/opengraph-image.tsx
HangerThem 64ae30b545 feat(seo): sitemap, robots, canonical URLs, OG images and JSON-LD
- Add sitemap.ts and robots.ts
- pageMetadata() helper: consistent title, canonical URL, Open Graph,
  Twitter card and feed alternate on every page
- Generated OG images: a site card, and per post either the cover image
  or a branded title card (pre-rendered at build)
- BlogPosting JSON-LD on post pages
- Fail fast with a clear error when SITE_URL is missing

Content loading:
- Validate post frontmatter at build time and normalize dates to ISO
  (fixes invalid <time datetime> values)
- Add draft: true support (drafts only render in development)
- Cache markdown rendering so metadata and page share one render
- Replace the three copy-pasted about/projects/setup pages with a shared
  MarkdownPage component
2026-10-19 14:22:40 +02:00

10 lines
342 B
TypeScript

import { SITE_DESCRIPTION, SITE_NAME } from '@/app/metadata'
import { ogImageSize, renderOgCard } from '@/lib/og-image'
export const alt = SITE_NAME
export const size = ogImageSize
export const contentType = 'image/png'
export default function OpengraphImage() {
return renderOgCard({ title: SITE_NAME, description: SITE_DESCRIPTION })
}