Removes extra slash (/)

The current link for the RSS feed link on the [Posts page](https://themes.gohugo.io//theme/hugo-theme-zzo/en/posts) renders as `/theme/hugo-theme-zzo/en/posts**//**index.xml`. This was causing 404 errors when serving from a Google Cloud Storage bucket. This PR removes that extra slash (/) and fixed those errors for me on all pages with an RSS feed.
This commit is contained in:
Cody Clark 2020-07-06 21:25:26 -04:00 committed by GitHub
parent 6757d0f3b1
commit 1f4059aba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
{{ if not (in ($.Param "notAllowedTypesInHomeFeed") .Type) }}
{{ $exclude := slice "tags" "series" "categories" }}
{{ if not (in $exclude .Type) }}
<a href="{{ if eq hugo.Version "0.65.2" }}{{ .CurrentSection.FirstSection.Permalink }}{{ else }}{{ .FirstSection.Permalink }}{{ end }}/index.xml" type="application/rss+xml" title="RSS" aria-label="RSS Feed Link">
<a href="{{ if eq hugo.Version "0.65.2" }}{{ .CurrentSection.FirstSection.Permalink }}{{ else }}{{ .FirstSection.Permalink }}{{ end }}index.xml" type="application/rss+xml" title="RSS" aria-label="RSS Feed Link">
{{ partial "svgs/etc/rss.svg" (dict "width" 32 "height" 32) }}
</a>
{{ else }}