Overview
How SEO is structured in GoLiveKit for metadata, Open Graph, robots, and sitemap.
AI Skill for SEO
/seo in your Copilot / Cursor or other chat to use skill with the provided context./seo Implement SEO changes according to the defined skill for [describe route or SEO artifact].
Overview
GoLiveKit uses centralized SEO helpers from src/lib/seo so static and dynamic routes follow one metadata strategy.
Meta Tags
For any page route, use generateMetadata and build metadata with createPageMetadata.
This ensures consistent:
- title and description
- canonical URL
- locale alternates (
hreflang-ready) - Open Graph and Twitter metadata
- robots indexing rules
Global defaults are configured through createSiteMetadata in the locale root layout.
Open Graph
Open Graph images are generated through shared rendering logic in src/lib/seo/og.tsx.
- Default image route:
/opengraph-image - Dynamic routes can define route-specific
opengraph-image.tsxto use Prisma data (e.g. blog/page title)
This gives consistent branding while allowing contextual OG previews.
Sitemap
/sitemap.xml is generated from src/app/sitemap.ts and includes:
- static routes
- docs routes
- dynamic Prisma-backed routes (blog posts and pages)
All URLs are absolute and based on NEXT_PUBLIC_BASE_HOST.
Robots
/robots.txt is generated from src/app/robots.ts.
Host and sitemap URL are derived from NEXT_PUBLIC_BASE_HOST in src/config/env.ts.
Adding SEO to New Routes
- Add
generateMetadatato the route. - Use
createPageMetadatawith the route path. - For dynamic content, fetch entity and return
noIndexmetadata when missing. - Add route-level OG image generator only when dynamic title/description improves sharing previews.