1
0
mirror of https://github.com/docker/docs.git synced 2026-10-23 18:09:02 +03:00

Merge pull request #26392 from dvdksn/fix-null-lastmod

fix: omit zero lastmod dates from sitemap
This commit is contained in:
David Karlsson
2026-10-20 17:10:34 +02:00
committed by GitHub

View File

@@ -10,7 +10,9 @@
{{- if ne .Params.sitemap false }}
<url>
<loc>{{ .Permalink}}</loc>
{{- if not .Lastmod.IsZero }}
<lastmod>{{ .Lastmod | time.Format "2006-01-02" }}</lastmod>
{{- end }}
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>