mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 10:52:06 -05:00
Added image support to the sitemap.xml template
Conflicts: tpl/template_embedded.go
This commit is contained in:
parent
0be2aade99
commit
3c147bd419
1 changed files with 7 additions and 0 deletions
|
@ -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>`)
|
||||
|
|
Loading…
Reference in a new issue