Overview
The sitemap is automatically generated and provides structured URLs for search engines. It’s accessible at/sitemap.xml and includes all documentation pages, blog posts, and static routes.
How It Works
The sitemap automatically includes:- Static routes (home page)
- All documentation pages from
docsSource - All blog posts from
blogSource - Proper priorities and change frequencies
- Alphabetically sorted URLs
Access Points
The sitemap is available at:/sitemap.xml- Complete sitemap in XML format
Implementation
The sitemap is implemented inweb/next/src/app/sitemap.ts:
web/next/src/app/sitemap.ts
Structure
The sitemap includes:Static Routes
Static Routes
- Home page: priority 1.0, weekly updates
Documentation Pages
Documentation Pages
- All pages from
docsSource - Priority: 0.9
- Change frequency: weekly
Blog Posts
Blog Posts
- All posts from
blogSource(excluding blog index) - Priority: 0.9
- Change frequency: monthly
Configuration
Priorities
| Page Type | Priority | Change Frequency |
|---|---|---|
| Home page | 1.0 | Weekly |
| Documentation | 0.9 | Weekly |
| Blog posts | 0.9 | Monthly |
Customization
To customize the sitemap:- Edit
web/next/src/app/sitemap.ts - Modify priorities and change frequencies
- Add or remove routes as needed
- Adjust sorting logic if required
Features
- Automatic page discovery from Fumadocs sources
- Configurable priorities and change frequencies
- Alphabetically sorted URLs for consistency
- Next.js
MetadataRoute.Sitemaptype for type safety - Automatic updates when content changes
SEO Benefits
- Faster Indexing: Search engines discover new pages quickly
- Better Crawling: Clear structure helps search engines understand your site
- Priority Signals: Indicate which pages are most important
- Change Frequency: Help search engines schedule re-crawling
The sitemap is automatically generated and doesn’t require manual updates when you add new pages.
Verification
Verify your sitemap:- Visit
/sitemap.xmlon your site - Check that all expected pages are listed
- Verify URLs are correctly formatted
- Submit to Google Search Console
Troubleshooting
Missing pages
Missing pages
If pages are missing from the sitemap:
- Check that pages are properly defined in Fumadocs sources
- Verify the page is not filtered out (like the blog index)
- Ensure the page has valid frontmatter
Incorrect URLs
Incorrect URLs
If URLs are incorrect:
- Check
config.app.urlis set correctly - Verify page URLs in Fumadocs sources
- Check for trailing slashes or missing prefixes