Remove draft posts from RSS and Atom feeds
This commit is contained in:
parent
256eae44e9
commit
4689129355
2 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
{{- $pages := .Site.RegularPages -}}
|
||||
{{- $pages := where .Site.RegularPages "Draft" "eq" false -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pageContext.RegularPages -}}
|
||||
{{- $pages = where $pageContext.RegularPages "Draft" "eq" false -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pageContext.Pages -}}
|
||||
{{- $pages = where $pageContext.Pages "Draft" "eq" false -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue