diff options
author | Lars Kruse <devel@sumpfralle.de> | 2020-11-03 04:27:54 +0300 |
---|---|---|
committer | Lars Kruse <devel@sumpfralle.de> | 2020-11-03 04:38:53 +0300 |
commit | 02eaa36d8d4362ddb8a288c18a4ac9998c630854 (patch) | |
tree | 3c0f4fe18545856d6ef3330f0024df77b02ca348 /layouts | |
parent | c29ef66a85f50b1248fe07b8fe095a7907257aa1 (diff) |
Add RSS feed
Source of feed-icon.svg:
https://en.wikipedia.org/wiki/File:Feed-icon.svg
(License: GPL2 or later)
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/head.html | 5 | ||||
-rw-r--r-- | layouts/partials/header.html | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1e7e079..1aa83a3 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,11 @@ <head> <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + {{ range .AlternativeOutputFormats -}} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} <link rel="canonical" href="{{ .Permalink }}"> <title> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 61e9479..eca14c9 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -29,4 +29,9 @@ </div> {{- end}} </div> + {{ with .OutputFormats.Get "rss" -}} + <div class="feed-icons"> + <a href=".Permalink"><img src="/img/feed-icon.svg" alt="RSS feed" /></a> + </div> + {{ end -}} </nav> |