Example New Blog Post - Dynamic Sitemap Test
This is an example blog post to demonstrate how the dynamic sitemap system automatically picks up new content.
What This Post Demonstrates
When you add a new .mdx
file to the src/(posts)/
directory with proper frontmatter, it will automatically be included in:
- Blog listing pages (
/blog/
) - Category pages (
/blog/category/tutorial/
) - Dynamic sitemaps (
/sitemap-posts.xml
) - Blog category sitemaps (
/sitemap-blog-categories.xml
)
Frontmatter Fields Used
---
title: "Example New Blog Post - Dynamic Sitemap Test"
date: "2024-06-21"
updatedAt: "2024-06-21"
categories: ["tutorial", "nextjs"]
tags: ["sitemap", "seo", "dynamic", "example"]
published: true
featured: false
priority: 0.7
changefreq: "monthly"
---
How It Works
- Automatic Discovery: The sitemap system scans the
src/(posts)/
directory - Frontmatter Parsing: Extracts metadata from the YAML frontmatter
- Dynamic Generation: Creates XML sitemaps with all discovered content
- Real-time Updates: No manual intervention required
Testing the System
After adding this post, you can:
- Visit
/blog/
to see it in the blog listing - Visit
/blog/category/tutorial/
to see it in the tutorial category - Visit
/sitemap-posts.xml
to see it in the posts sitemap - Visit
/sitemap-blog-categories.xml
to see the updated categories
Benefits
- ✅ No Manual Updates: Sitemaps update automatically
- ✅ SEO Optimized: Proper XML structure with all required fields
- ✅ Filterable: Use query parameters to filter sitemap content
- ✅ Performance: Cached responses for better performance
This post will appear in your sitemaps immediately after the next build or dev server restart!