make news catch all in rss feed

This commit is contained in:
teldra 2021-10-23 23:04:01 +02:00
parent 608f089ea7
commit f1cb66d154
2 changed files with 8 additions and 10 deletions

View File

@ -6,6 +6,9 @@
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- if eq .Section "news" -}}
{{- $pages = where .Site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}

View File

@ -16,16 +16,11 @@
</div>
<div class="infobox">
{{ if or (eq .Section "news") (eq .Section "orga") }}
<a href="/index.xml">RSS</a><br><br>
{{ else }}
{{- with .OutputFormats.Get "rss" -}}
{{- if .Permalink -}}
{{- printf `<a href="%s">` .Permalink | safeHTML -}}
{{- end -}}
RSS</a><br><br>
{{- with .OutputFormats.Get "rss" -}}
{{- if .Permalink -}}
{{- printf `<a href="%s">` .Permalink | safeHTML -}}
{{- end -}}
{{ end }}
RSS</a><br><br>
{{- end -}}
<a href="https://schlomp.space/Bunteshaus/bunteshaus.de">Sourcecode</a>
</div>