hugolib: Fix redundant URL file extension on taxonomy terms pages

Fixes #2819
This commit is contained in:
Cameron Moore
2016-12-26 20:36:08 -06:00
committed by Bjørn Erik Pedersen
parent e78dd3cd48
commit 17f851780c
2 changed files with 14 additions and 1 deletions

View File

@@ -758,7 +758,7 @@ func (p *Page) createPermalink() (*url.URL, error) {
// No permalink config for nodes (currently)
pURL := strings.TrimSpace(p.Site.pathSpec.URLize(p.URLPath.URL))
pURL = p.addLangPathPrefix(pURL)
pURL = p.Site.pathSpec.URLPrep(path.Join(pURL, "index."+p.Extension()))
pURL = p.Site.pathSpec.URLPrep(pURL)
url := helpers.MakePermalink(baseURL, pURL)
return url, nil
}