From f249ee222bb2181a9fc5237f0cb353dba888b22c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Duje=20Mihanovi=C4=87?= Date: Wed, 30 Aug 2023 18:08:13 +0200 Subject: [PATCH] Properly link RSS feed in templates --- layouts/_default/baseof.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0e647e8..b3e08ca 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,8 +4,10 @@ {{ partial "meta.html" . }} {{ $style := resources.Get "css/style.css" | resources.Minify }} - - + {{ $index := $.Site.GetPage "/" }} + {{ range $index.AlternativeOutputFormats }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{ end }} @@ -26,8 +28,9 @@ {{ end }} {{ $image := resources.Get "img/rss.svg" }}

- - Link to RSS feed + {{ with $index.OutputFormats.Get "RSS" }} + {{ printf `Link to RSS feed` .RelPermalink $image.RelPermalink | safeHTML }} + {{ end }}

This site is free software

-- 2.39.2