Add only list pages to the rss index.html

This commit is contained in:
Joe Hutchinson
2019-01-30 09:11:06 -05:00
parent b5cb9ffdf6
commit 7bc710cdf3

View File

@@ -12,7 +12,8 @@
{{ 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 }} {{ $paginator := .Paginate (where .Pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.Pages -}}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
@@ -21,6 +22,6 @@
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ if (isset .Params "description") }}{{ index .Params "description" | html }}{{ else }}{{ .Summary | html }}{{ end }}</description> <description>{{ if (isset .Params "description") }}{{ index .Params "description" | html }}{{ else }}{{ .Summary | html }}{{ end }}</description>
</item> </item>
{{ end }} {{- end }}
</channel> </channel>
</rss> </rss>