hugolib: Fix regressions with uglyURLs

Fixes #2734
This commit is contained in:
Bjørn Erik Pedersen 2016-11-26 15:50:32 +01:00
parent 1f6e0de361
commit c38bfda43b
9 changed files with 101 additions and 31 deletions

View file

@ -118,7 +118,7 @@ func (s *Site) renderPaginator(p *Page) error {
}
pageNumber := i + 1
htmlBase := path.Join(p.URLPath.URL, fmt.Sprintf("/%s/%d", paginatePath, pageNumber))
htmlBase := path.Join(append(p.sections, fmt.Sprintf("/%s/%d", paginatePath, pageNumber))...)
htmlBase = p.addLangPathPrefix(htmlBase)
if err := s.renderAndWritePage(pagerNode.Title,
@ -156,7 +156,8 @@ func (s *Site) renderRSS(p *Page) error {
rssPage.Data["Pages"] = rssPage.Pages
}
rssURI := s.Language.GetString("rssURI")
rssPath := path.Join(rssPage.URLPath.URL, rssURI)
rssPath := path.Join(append(rssPage.sections, rssURI)...)
s.setPageURLs(rssPage, rssPath)
return s.renderAndWriteXML(rssPage.Title,