1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-17 17:57:04 +01:00

layouts/_default/baseof.html: Improve handling of RSS

We are explicitly using the site's RSS feed, but after reading the
Hugo RSS docs I think it's better if we use the contextual version
of the RSSlink. This will make the RSS plumbing show a feed for the
current category, tag, section, etc. The example code also adds a
bit of markup to help browsers find the content more easily.

See: https://gohugo.io/templates/rss/
This commit is contained in:
Alan Orth 2016-11-09 15:39:23 +02:00
parent b23a4b13a9
commit 929d2d976a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -12,8 +12,11 @@
{{ "<!-- combined, minified CSS -->" | safeHTML }}
<link href="{{ .Site.BaseURL }}css/style.css" rel="stylesheet">
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
<link href="{{ .Site.RSSLink }}" type="application/rss+xml" rel="alternate">
{{ if .RSSlink }}
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
<link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSlink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}
</head>