hugolib: Only return RSSLink when RSS is available

Fixes #1302
This commit is contained in:
Bjørn Erik Pedersen
2017-03-01 12:30:41 +01:00
parent b7a672fd22
commit cc15864744
4 changed files with 14 additions and 4 deletions

View File

@@ -2087,7 +2087,9 @@ func (s *Site) newHomePage() *Page {
func (s *Site) setPageURLs(p *Page, in string) {
p.URLPath.URL = s.PathSpec.URLizeAndPrep(in)
p.URLPath.Permalink = s.Info.permalink(p.URLPath.URL)
p.RSSLink = template.HTML(s.Info.permalink(in + ".xml"))
if p.Kind != KindPage && p.Kind != KindTaxonomyTerm {
p.RSSLink = template.URL(s.Info.permalink(in + ".xml"))
}
}
func (s *Site) newTaxonomyPage(plural, key string) *Page {