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' style = 'monokailight'
tabWidth = 4 tabWidth = 4
[params]
mainSections = ['posts']
## uncomment belows and set proper values to enable remark42 ## uncomment belows and set proper values to enable remark42
# [params.remark42] # [params.remark42]
# host='' # host=''

View file

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