From 2127203ae386da117647f619299a0a53b71b3c4d Mon Sep 17 00:00:00 2001 From: Daniel Lang Date: Tue, 3 Jan 2017 08:11:22 -0800 Subject: Update documentation and test for sitemap template --- hugolib/sitemap_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hugolib/sitemap_test.go') diff --git a/hugolib/sitemap_test.go b/hugolib/sitemap_test.go index aba47ae7d..3fb26638c 100644 --- a/hugolib/sitemap_test.go +++ b/hugolib/sitemap_test.go @@ -26,8 +26,8 @@ import ( const sitemapTemplate = ` {{ range .Data.Pages }} - {{ .Permalink }} - {{ safeHTML ( .Date.Format "2006-01-02T15:04:05-07:00" ) }}{{ with .Sitemap.ChangeFreq }} + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} {{ .Sitemap.Priority }}{{ end }} -- cgit v1.2.3