diff options
author | Ghosin <admin@ghosin.com> | 2020-05-15 19:49:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 19:49:47 +0300 |
commit | 36f59a72ee4c186cc525b67da6813498f43a711c (patch) | |
tree | be1ece10556aab66ec1a833f13ea4b046d1cf2c1 | |
parent | acef6c143ed743415c194808f3e471edbe72a307 (diff) |
fix(rss): fix self atom:link. (#363)
-rw-r--r-- | layouts/index.rss.xml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/index.rss.xml b/layouts/index.rss.xml index 8d4eef0..515f188 100644 --- a/layouts/index.rss.xml +++ b/layouts/index.rss.xml @@ -33,7 +33,9 @@ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}} </lastBuildDate> {{- 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) -}} {{- dict "page" . "site" .Site | partial "rss/item.html" -}} {{- end -}} |