diff --git a/resources/views/sitemap/sitemap.antlers.xml b/resources/views/sitemap/sitemap.antlers.xml index 3b08ff9..8c19e5c 100644 --- a/resources/views/sitemap/sitemap.antlers.xml +++ b/resources/views/sitemap/sitemap.antlers.xml @@ -2,29 +2,31 @@ {{ seo:sitemap_collections }} {{ collection from="{handle}" seo_noindex:isnt="true" as="results" }} - {{ results }} - - {{ permalink }} - {{ updated_at format="Y-m-d"}} - {{ sitemap_change_frequency ? sitemap_change_frequency : 'weekly' }} - {{ sitemap_priority ? sitemap_priority : '0.5' }} - {{ if {locales:count} > 1 }} - {{ once }} - {{ section:namespace}} - xmlns:xhtml="http://www.w3.org/1999/xhtml" - {{ /section:namespace}} - {{ /once }} - {{ locales }} - - {{ /locales }} - {{ /if }} - + {{ results where (x => x.permalink !== null) }} + {{ if permalink }} + + {{ permalink }} + {{ updated_at format="Y-m-d"}} + {{ sitemap_change_frequency ? sitemap_change_frequency : 'weekly' }} + {{ sitemap_priority ? sitemap_priority : '0.5' }} + {{ if {locales:count} > 1 }} + {{ once }} + {{ section:namespace}} + xmlns:xhtml="http://www.w3.org/1999/xhtml" + {{ /section:namespace}} + {{ /once }} + {{ locales }} + + {{ /locales }} + {{ /if }} + + {{ /if }} {{ /results }} {{ /collection }} {{ /seo:sitemap_collections }} {{ seo:sitemap_taxonomies }} {{ taxonomy from="{handle}" seo_noindex:isnt="true" as="results" }} - {{ results }} + {{ results where (x => x.permalink !== null) }} {{ permalink }} {{ updated_at format="Y-m-d"}} @@ -48,4 +50,4 @@ {{ /taxonomy }} {{ /collections }} {{ /seo:sitemap_collection_taxonomies }} - \ No newline at end of file +