Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion layouts/_default/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{ 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 .Site.AllPages }}
{{ range hugo.Sites }}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says this replaces .Site.AllPages with site.AllPages, but the template now loops over hugo.Sites and .Pages. Please align the implementation with the stated change (or update the PR description) so reviewers know whether sitemap behavior is intended to change.

Copilot uses AI. Check for mistakes.
{{ range .Pages }}
Comment on lines +4 to +5
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hugo.Sites + range .Pages is not an equivalent replacement for the deprecated .Site.AllPages and can change sitemap output (e.g., excluding some page kinds that AllPages previously included). To keep behavior while removing the deprecation warning, iterate site.AllPages (or the exact intended collection, e.g. site.Pages/site.RegularPages) directly instead of switching to .Pages on each site.

Copilot uses AI. Check for mistakes.
{{- if and (not .Params.sitemap_exclude) (not .Draft) }}
<url>
<loc>{{ .Permalink }}</loc>
Expand All @@ -17,4 +18,5 @@
</url>
{{- end }}
{{ end }}
{{ end }}
</urlset>
Loading