#1142061 hugo: sitemap.xml is invalid on version < 0.164.0

Package:
hugo
Source:
hugo
Description:
Fast and flexible Static Site Generator written in Go
Submitter:
Wesley Schwengle
Date:
2026-07-14 17:27:02 UTC
Severity:
normal
#1142061#3
Date:
2026-07-14 17:25:33 UTC
From:
To:
Dear Maintainer,

When running `hugo` or `hugo build` you end up w/ a sitemap.xml which has an
empty line. This causes XML parsers to complain.

$ head -5 public/sitemap.xml

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>

vs 0.164.0

$ head -5 public/sitemap.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://....</loc>

Upstream has solved this in 0.164.0 afaik, I tested 0.162.x on unstable,
0.163.0 and 0.164.0 from the ghcr, all but 0.164.0 exhibit the behaviour.

Could you please upgrade hugo to 0.164?

Many thanks,
Wesley