RSS of each section are always shown

the "Feed Of ALL" is removed and "Feed Of 'Section'" is always shown
This commit is contained in:
leafee98 2022-05-18 21:29:55 +08:00
parent e2ca0c5332
commit 0ce04d50c7
2 changed files with 15 additions and 18 deletions

View file

@ -21,6 +21,9 @@ noHl = false
style = 'monokailight'
tabWidth = 4
[params]
mainSections = ['posts']
## uncomment belows and set proper values to enable remark42
# [params.remark42]
# host=''

View file

@ -1,11 +1,5 @@
<footer class="footer">
<div class="footer-row">
<a class="footer-item" href="{{ "/index.xml" | relURL }}">
Feed of ALL
<i class="icofont-rss"></i>
</a>
{{ if gt (len .Site.Sections) 1 }}
{{ range .Site.Sections }}
{{ $section := . }}
{{ with .OutputFormats.Get "rss" }}
@ -15,18 +9,18 @@
</a>
{{ end }}
{{ end }}
{{ end }}
{{ if not (or .IsHome .IsSection) }}
{{ $section := . }}
{{ $term := . }}
{{ with .OutputFormats.Get "rss" }}
<a class="footer-item" href="{{ .Permalink }}">
Feed of {{ $section.Section | humanize }}
Feed of "{{ $term.Title }}"
<i class="icofont-rss"></i>
</a>
{{ end }}
{{ end }}
</div>
{{ range .Site.Params.footer_rows }}
<div class="footer-row">
{{ range .items }}