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" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range .Pages }}
{{ $paginator := .Paginate (where .Pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.Pages -}}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
@@ -21,6 +22,6 @@
<guid>{{ .Permalink }}</guid>
<description>{{ if (isset .Params "description") }}{{ index .Params "description" | html }}{{ else }}{{ .Summary | html }}{{ end }}</description>
</item>
{{ end }}
{{- end }}
</channel>
</rss>