diff --git a/src/Lib/Sitemap.php b/src/Lib/Sitemap.php index 9a35485..311f8fc 100644 --- a/src/Lib/Sitemap.php +++ b/src/Lib/Sitemap.php @@ -36,7 +36,14 @@ class Sitemap // Ignorer le tag dans tout les cas. return null; } - })->filter(); + })->filter(function (?Tag $tag) { + $queries = \collect(\parse_url($tag->getUrl(), \PHP_URL_QUERY))->filter(); + // ! Ignore null from previous or tags with urls that have Queries. + if (!$tag or $queries->count()) { + return null; + } + return $tag; + }); $this->assignPrioritiesAndFrequencies(); }