From a6961ff0c367095fe148b6ac32b2aeca0ba9e0bd Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 23 Aug 2021 15:16:34 +0200 Subject: [PATCH] template: add RSS link to head of each page 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 `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} ref: https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head --- layouts/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/index.html b/layouts/index.html index 2d62418..3fb7522 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,7 @@ {{ define "head" }} +{{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} {{ if .Site.Params.bgImg -}} {{- else if .Site.Params.images -}}