Skip to content

Commit ddf7813

Browse files
authored
feat: add rss link to document head for autodiscovery #416
In order to not end up with a double slash in the path when constructing the absolute feed url out of `.Site.BaseURL` and `.Site.Params.news.feed`, I've inserted a dot in-between. In a http request, double slashes will be transmitted as-is, potentially causing issues, whereas dot segments are to be resolved by the client beforehand (as per rfc3986). It's the little things… ;-))
1 parent 23da954 commit ddf7813

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
{{ else }}
3333
<meta name="robots" content="noindex">
3434
{{ end }}
35+
<link href="{{ .Site.BaseURL }}.{{ .Site.Params.news.feed }}" rel="alternate" title="{{ .Site.Params.news.name }}" type="application/rss+xml">
3536
</head>
3637

3738
<body>

0 commit comments

Comments
 (0)