b2in/packages/flux-cms/core/resources/views/sitemap.blade.php
2025-10-20 17:50:35 +02:00

24 lines
1 KiB
PHP

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@foreach($pages as $page)
@foreach(config('flux-cms.locales', ['de']) as $locale => $localeName)
<url>
<loc>{{ $page->getUrl($locale) }}</loc>
<lastmod>{{ $page->updated_at->format('Y-m-d') }}</lastmod>
<changefreq>weekly</changefreq>
<priority>{{ $page->getTranslation('slug', $locale) === '/' ? '1.0' : '0.8' }}</priority>
</url>
@endforeach
@endforeach
@foreach($blogPosts as $post)
@foreach(config('flux-cms.locales', ['de']) as $locale => $localeName)
<url>
<loc>{{ $post->getUrl($locale) }}</loc>
<lastmod>{{ $post->updated_at->format('Y-m-d') }}</lastmod>
<changefreq>monthly</changefreq>
<priority>{{ $post->is_featured ? '0.9' : '0.7' }}</priority>
</url>
@endforeach
@endforeach
</urlset>