XML Sitemaps
10-20 minBeginner
You must generate the sitemap by querying all Contentful entries.
Prerequisites
- Developer
Advanced Recommended
Build Time Generation
Standard for Jamstack.
1
Script
1
Write a script (e.g., next-sitemap or custom node script)
2
Step 1: Fetch all slugs from Contentful: query { pageCollection { items { slug } } }
3
Step 2: Loop through and generate XML
4
Step 3: Save to public/sitemap.xml
Verification Checklist
- Run build