📝 priettier check
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s

This commit is contained in:
RJ
2025-12-04 15:57:39 +02:00
parent b68325123b
commit 101624c4d5
32 changed files with 185 additions and 172 deletions

View File

@@ -3,10 +3,10 @@ import { getAllPosts } from '@/lib/markdown'
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3030'
// Get all blog posts
const posts = await getAllPosts("en", false)
const posts = await getAllPosts('en', false)
// Generate sitemap entries for blog posts
const blogPosts: MetadataRoute.Sitemap = posts.map(post => ({
url: `${baseUrl}/blog/${post.slug}`,
@@ -14,7 +14,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
changeFrequency: 'monthly' as const,
priority: 0.8,
}))
// Static pages
const staticPages: MetadataRoute.Sitemap = [
{
@@ -36,6 +36,6 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
priority: 0.7,
},
]
return [...staticPages, ...blogPosts]
}