Skip to content

Commit

Permalink
Fix RSS link for paginated list pages (adityatelange#1192)
Browse files Browse the repository at this point in the history
The link was previously hard-coded to index.html, which doesn't work on
paginated list pages because it would go to something like
/section/pages/2/index.html instead of /section/index.html.
  • Loading branch information
Alexander Zhang authored and romainx committed May 1, 2023
1 parent fbf4b8d commit 65c2f3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<h1>
{{ .Title }}
{{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }}
<a href="index.xml" title="RSS" aria-label="RSS">
{{- with .OutputFormats.Get "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" />
Expand All @@ -19,6 +20,7 @@ <h1>
</svg>
</a>
{{- end }}
{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">
Expand Down

0 comments on commit 65c2f3f

Please sign in to comment.