Sitemap
Auto-generated sitemap for search engines.
Overview
The sitemap is automatically generated and provides structured URLs for search engines. It's accessible at /sitemap.xml and includes all documentation pages, published blog posts, and static routes.
How It Works
The sitemap automatically includes:
- Static routes (home page)
- All documentation pages from
docsSource - Published blog posts from
blogSource - Proper priorities and change frequencies
- Alphabetically sorted URLs
Access Points
- sitemap.xml - Complete sitemap for ZeroStarter
Implementation
The sitemap is implemented in web/next/src/app/sitemap.ts and uses:
- Next.js
MetadataRoute.Sitemaptype - Automatic page discovery from Fumadocs sources
- Configurable priorities and change frequencies:
- Home page: priority 1.0, weekly updates
- Documentation pages: priority 0.9, weekly updates
- Blog posts: priority 0.9, monthly updates
The route is force-static with revalidate = 60, so the generated sitemap is regenerated at most once a minute.
Structure
The sitemap includes:
- Static Routes: Home page (priority 1.0, weekly updates)
- Documentation: All pages from
docsSource(priority 0.9, weekly updates) - Blog: Published posts from
getPublishedBlogPosts()(priority 0.9, monthly updates)
The blog index page is excluded because getPublishedBlogPosts() returns only individual published posts (it filters out the /blog index), not because sitemap.ts does any filtering of its own.
Home and documentation entries set lastModified to the build time (new Date()). Blog entries use updatedAt for lastModified when present, otherwise publishedAt.
All entries are automatically sorted alphabetically by URL for consistency.