Skip to content

Commit

Permalink
fix: inclusion of null locs in sitemap.xml
Browse files Browse the repository at this point in the history
Impacted by Hugo changes

Fix #2732
  • Loading branch information
gcushen committed Jun 2, 2022
1 parent d0aac60 commit d266249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wowchemy/layouts/_default/sitemap.xml
Expand Up @@ -2,7 +2,7 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{/* Check that page is built (has a URL) and is not private. */}}
{{ range where (where .Data.Pages "Permalink" "!=" nil) "Params.private" "ne" true }}
{{ range where (where .Data.Pages "Permalink" "!=" "") "Params.private" "ne" true }}
<url>
<loc>{{ .Permalink }}</loc>
{{- if not .Lastmod.IsZero }}<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}
Expand Down

0 comments on commit d266249

Please sign in to comment.