Fix RSS link for paginated list pages (#1192)

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.
This commit is contained in:
Alexander Zhang 2023-04-23 07:17:46 -07:00 committed by GitHub
parent a34784c3ed
commit 8d1e45a42a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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" />
@ -19,6 +20,7 @@
</svg>
</a>
{{- end }}
{{- end }}
</h1>
{{- if .Description }}
<div class="post-description">