template: add RSS link to head of each page
All checks were successful
continuous-integration/drone/push Build is passing

using the below would also add any other alternative formats.
since we don't use any other alt formats, it will only output the link
to RSS feed for each page.
{{ range .AlternativeOutputFormats -}}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

ref: https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head
This commit is contained in:
surtur 2021-08-23 15:16:34 +02:00
parent d23e961b70
commit a6961ff0c3
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -1,4 +1,7 @@
{{ define "head" }}
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ if .Site.Params.bgImg -}}
<style>.bg-img {background-image: url('{{.Site.Params.bgImg}}');}</style>
{{- else if .Site.Params.images -}}