mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
rss: fix hidden special cases #382
This commit is contained in:
parent
8442cd54bb
commit
1d1f5fad91
1 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
{{- if ge $limit 0 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end }}
|
||||
{{- $page := . }}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
|
@ -25,7 +26,8 @@
|
|||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
{{- range $pages }}
|
||||
{{- if and .Permalink .Title (or (ne (.Scratch.Get "relearnIsHiddenNode") true) (ne .Site.Params.disableSeoHiddenPages true) ) }}
|
||||
{{- $relearnIsHiddenFrom := index ($page.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }}
|
||||
{{- if and .Permalink .Title (or (not $relearnIsHiddenFrom) (ne .Site.Params.disableSeoHiddenPages true) ) }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
|
@ -36,7 +38,7 @@
|
|||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in a new issue