summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleafee98 <leafee98@hotmail.com>2022-05-18 21:29:55 +0800
committerleafee98 <leafee98@hotmail.com>2022-05-18 21:29:55 +0800
commit0ce04d50c74e58b6056a99b8f7cf0653dcf33fc8 (patch)
tree88620624dbc1986d0eb6faf2ac42834fefd0685f
parente2ca0c5332668ba031015dae977f7816b2809f06 (diff)
RSS of each section are always shown
the "Feed Of ALL" is removed and "Feed Of 'Section'" is always shown
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/partials/footer.html26
2 files changed, 13 insertions, 16 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index b9dfa0b..dcfe6c3 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -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=''
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 91bd035..b863751 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,32 +1,26 @@
<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" }}
- <a class="footer-item" href="{{ .Permalink }}">
- Feed of {{ $section.Section | humanize }}
- <i class="icofont-rss"></i>
- </a>
- {{ end }}
+ {{ 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 }}
{{ 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 }}