mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
hugolib, tplimpl: Use OutputFormats to create atom links
This commit is contained in:
@@ -76,7 +76,9 @@ func (t *GoHTMLTemplate) EmbedTemplates() {
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range .Data.Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
|
Reference in New Issue
Block a user