kopia lustrzana https://github.com/lowtechmag/solar_v2
unlisted posts should not show up in RSS either
rodzic
b5c24dcd1b
commit
08af6fea70
|
@ -6,9 +6,12 @@
|
|||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $allposts := where .Site.RegularPages "Type" "in" "posts" -}}
|
||||
{{- $notunlisted := where site.RegularPages ".Params.unlisted" "!=" "true" -}}
|
||||
{{- $posts := $allposts | intersect $notunlisted -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- $pages = $posts | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
|
@ -40,7 +43,6 @@
|
|||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
|
Ładowanie…
Reference in New Issue