Skip to content

Commit

Permalink
feat: new sitemap disable configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Carneiro committed Oct 17, 2024
1 parent 01e61b9 commit 284f9da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
{{ range where .Pages "Sitemap.Disable" "ne" true }}
{{- if and (.Permalink) (not .Params.noindex) -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
Expand All @@ -21,4 +21,4 @@
</url>
{{- end -}}
{{ end }}
</urlset>
</urlset>

0 comments on commit 284f9da

Please sign in to comment.