From 95eaf0e6279fed98e6780776d92390f5ca8c3112 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 10 Nov 2023 11:58:30 +0100 Subject: [PATCH] Fix sitemap.xml output --- resources/views/sitemap.antlers.html | 23 +++++++++++----------- src/Http/Controllers/SitemapController.php | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/resources/views/sitemap.antlers.html b/resources/views/sitemap.antlers.html index f3f215f..ce10ac6 100644 --- a/resources/views/sitemap.antlers.html +++ b/resources/views/sitemap.antlers.html @@ -1,12 +1,13 @@ - +{{ header }} -{{ entries }} - - {{ loc }} - {{ lastmod }} - {{ alternates }} - - {{ /alternates }} - -{{ /entries }} - + {{ entries }} + + {{ loc }} + {{ lastmod }} + {{ alternates }} + + {{ /alternates }} + + {{ /entries }} + \ No newline at end of file diff --git a/src/Http/Controllers/SitemapController.php b/src/Http/Controllers/SitemapController.php index 4a82e57..ccbd462 100644 --- a/src/Http/Controllers/SitemapController.php +++ b/src/Http/Controllers/SitemapController.php @@ -44,6 +44,7 @@ public function __invoke() $content = Cache::remember('seotamic_sitemap', 1, function () use ($entries) { return view('seotamic::sitemap', [ + 'header' => '', 'entries' => $entries, ])->render(); }); @@ -67,5 +68,4 @@ private static function shouldBeIndexed(Entry $entry): bool return true; } - }