mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
Added image support to the sitemap.xml template
Conflicts: tpl/template_embedded.go
This commit is contained in:
@ -77,6 +77,13 @@ func (t *GoHTMLTemplate) EmbedTemplates() {
|
||||
<lastmod>{{ safeHtml ( .Date.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 }}
|
||||
{{ range .Params.images }}
|
||||
<image:image>
|
||||
<image:loc>.src</image:loc>
|
||||
{{ with .title }}<image:title><![CDATA[.]]></image:title>{{ end }}
|
||||
{{ with .caption }}<image:caption><![CDATA[.]]></image:caption>{{ end }}
|
||||
</image:image>
|
||||
{{ end }}
|
||||
</url>
|
||||
{{ end }}
|
||||
</urlset>`)
|
||||
|
Reference in New Issue
Block a user