Fix RSS deprecation warning

https://github.com/rhazdon/hugo-theme-hello-friend-ng/issues/12
This commit is contained in:
Djordje Atlialp 2019-04-15 22:23:27 +02:00
parent c2d78a290c
commit 927044d00b
1 changed files with 4 additions and 4 deletions

View File

@ -44,9 +44,9 @@
<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
<!-- RSS -->
{{ if .RSSLink }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<!-- JSON Feed -->
{{ if .OutputFormats.Get "json" }}
@ -57,4 +57,4 @@
<!-- Custom head tags -->
{{- if templates.Exists "partials/extra-head.html" -}}
{{ partial "extra-head.html" . }}
{{- end }}
{{- end }}