Skip to content

Commit

Permalink
Add RSS icon to archives page
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatelange authored and romainx committed May 1, 2023
1 parent 65c2f3f commit c811e47
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion layouts/_default/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@
{{- end }}

<header class="page-header">
<h1>{{ .Title }}<sup class="archive-count">&nbsp;&nbsp;{{ len $pages }}</sup></h1>
<h1>
{{ .Title }}<sup class="archive-count">&nbsp;&nbsp;{{ len $pages }}</sup>
{{- if (.Param "ShowRssButtonInSectionTermList") }}
{{- $rss := (.OutputFormats.Get "rss") }}
{{- if (eq .Kind `page`) }}
{{- $rss = (.Parent.OutputFormats.Get "rss") }}
{{- end }}
{{- with $rss }}
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" height="23">
<path d="M4 11a9 9 0 0 1 9 9" />
<path d="M4 4a16 16 0 0 1 16 16" />
<circle cx="5" cy="19" r="1" />
</svg>
</a>
{{- end }}
{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
Expand Down

0 comments on commit c811e47

Please sign in to comment.