mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 09:02:18 +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:
parent
b23a4b13a9
commit
929d2d976a
@ -12,8 +12,11 @@
|
|||||||
{{ "<!-- combined, minified CSS -->" | safeHTML }}
|
{{ "<!-- combined, minified CSS -->" | safeHTML }}
|
||||||
<link href="{{ .Site.BaseURL }}css/style.css" rel="stylesheet">
|
<link href="{{ .Site.BaseURL }}css/style.css" rel="stylesheet">
|
||||||
|
|
||||||
|
{{ if .RSSlink }}
|
||||||
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
|
{{ "<!-- RSS 2.0 feed -->" | safeHTML }}
|
||||||
<link href="{{ .Site.RSSLink }}" type="application/rss+xml" rel="alternate">
|
<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" . }}
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user