Skip to content

Commit e789d5d

Browse files
authored
Fixes the RSS footer links to only Newsroom (#131)
* Fixes the RSS footer links to only Newsroom * Also adds Blog and case stuies
1 parent 6b4a60c commit e789d5d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

layouts/partials/site-footer.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ <h3 style="margin: 0px; margin-top: 10px; margin-left: 10px; align-self: center
1717

1818
<div class="credits" style="margin-top: 10px;">
1919
{{ $sections := where $.Site.Pages ".Kind" "section" }}
20+
{{ $feeds := dict "newsroom" "Newsroom" "blog" "Blog" "case-studies" "Case Studies" }}
2021
{{ range $sections }}
21-
{{ $site_title_rss := .Site.Title }}
22-
{{ $page_title_rss := .Page.Title }}
23-
{{ with .OutputFormats.Get "rss" }}
24-
<a type="application/rss+xml" title="{{ $site_title_rss }} - {{ $page_title_rss }} Feed" href="{{.Permalink}}"><img src="/img/rss.webp" height="20"> {{ $page_title_rss }}</a>&nbsp; &nbsp;
22+
{{ $label := index $feeds .Section }}
23+
{{ if and $label .Parent.IsHome }}
24+
{{ with .OutputFormats.Get "rss" }}
25+
<a type="application/rss+xml" title="{{ $.Site.Title }} - {{ $label }} Feed" href="{{.Permalink}}"><img src="/img/rss.webp" height="20"> {{ $label }}</a>&nbsp; &nbsp;
26+
{{ end }}
2527
{{ end }}
2628
{{ end }}
2729
</div>

0 commit comments

Comments
 (0)