mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Set s.Info.LastChange to Lastmod
Set sitemap.xml <lastmod> field to Lastmod. See #733
This commit is contained in:
		| @@ -73,8 +73,8 @@ func (t *GoHTMLTemplate) EmbedTemplates() { | ||||
| 	t.AddInternalTemplate("_default", "sitemap.xml", `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||||
|   {{ range .Data.Pages }} | ||||
|   <url> | ||||
|     <loc>{{ .Permalink }}</loc>{{ if not .Date.IsZero }} | ||||
|     <lastmod>{{ safeHTML ( .Date.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} | ||||
|     <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} | ||||
|     <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} | ||||
|     <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} | ||||
|     <priority>{{ .Sitemap.Priority }}</priority>{{ end }} | ||||
|   </url> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user