fix(rss): fix self atom:link. (#363)

This commit is contained in:
Ghosin 2020-05-16 00:49:47 +08:00 committed by GitHub
parent acef6c143e
commit 36f59a72ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,9 @@
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}} {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</lastBuildDate> </lastBuildDate>
{{- end -}} {{- end -}}
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" /> {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}} {{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
{{- dict "page" . "site" .Site | partial "rss/item.html" -}} {{- dict "page" . "site" .Site | partial "rss/item.html" -}}
{{- end -}} {{- end -}}