Only show first 15 posts as per RSS 2.0 spec

alternate-navbar
Maik de Kruif 3 years ago
parent 7da90d2562
commit ba34adc634
Signed by: maik
GPG Key ID: 44A55AD1F0673FA6
  1. 6
      themes/maik-blog/layouts/_default/rss.xml

@ -19,10 +19,10 @@
{{- if not .Date.IsZero }} {{- if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate> <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{- end }} {{- end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }} {{- end }}
{{ range .Pages }} {{ range .Pages | first 15 }}
<item> <item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title> <title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>

Loading…
Cancel
Save