Correction du flux RSS
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
{{- $pages = $pctx.Pages }}
|
||||
{{- end }}
|
||||
|
||||
{{- $pages = $pages.ByLastmod.Reverse }}
|
||||
{{- $pages = partial "rss/pages.html" (dict "pages" $pages) }}
|
||||
{{- $pages = $pages.ByPublishDate.Reverse }}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $pages = first $limit $pages }}
|
||||
@@ -39,8 +40,8 @@
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
||||
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
||||
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if gt (len $pages) 0 }}
|
||||
<lastBuildDate>{{ (index $pages 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user