#14
feat(metadata): add monorepo-specific strategies (metadataBase, dynam…
Metadata Monorepo Strategies
Description
This PR adds a new section to metadata.md focusing on absolute URL handling and dynamic metadata stability in complex monorepo environments.
Changes
- metadataBase: Documentation on using environment variables to ensure absolute URLs for Open Graph images and sitemaps across nested applications.
- Dynamic Handlers: Best practice for using explicit Route Handlers (
sitemap.xml/route.ts) when file-based metadata (sitemap.ts) causes prerender crashes or database-related build timeouts.
Rationale
In monorepo architectures, relative URLs often fail for social sharing tags. Additionally, large-scale apps frequently encounter stability issues with "magic" metadata files during static generation; explicit route handlers provide more deterministic behavior.