examples: Replace .RSSLink
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 14 Oct 2019 07:30:09 +0000 (09:30 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 07:30:09 +0000 (09:30 +0200)
Fixes #6037

examples/blog/layouts/partials/header.html

index 24500a483a4681c469a0ffbcfbd3b686aec0f984..5863e59ec88888f4c0e2181c998316ef0bac2263 100644 (file)
@@ -6,5 +6,7 @@
     <title>{{ .Title }} - {{ .Site.BaseURL }}</title>
     <link rel="canonical" href="{{ .Permalink }}">
     {{ partial "header.includes.html" . }}
-    {{ if .RSSLink }}<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />{{ end }}
+    {{ with .OutputFormats.Get "RSS" -}}
+    {{ printf "<link href=%q rel=\"alternate\" type=%q title=%q />" .Permalink .MediaType .Title | safeHTML }}
+    {{- end }}
 </head>