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