<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
@foreach($posts as $post)
  <url>
    <loc>{{ rtrim(env('FRONTEND_URL', 'http://localhost:3000'), '/') . '/' . $post->continent->slug . '/' . $post->country->slug . '/' . $post->category->slug . '/' . $post->slug }}</loc>
    <news:news>
      <news:publication>
        <news:name>MegaBlog</news:name>
        <news:language>en</news:language>
      </news:publication>
      <news:publication_date>{{ $post->published_at->toAtomString() }}</news:publication_date>
      <news:title>{{ htmlspecialchars($post->title, ENT_XML1, 'UTF-8') }}</news:title>
    </news:news>
  </url>
@endforeach
</urlset>
