hugolib: Fix bundle path when slug is set

Fixes #4870
This commit is contained in:
Bjørn Erik Pedersen
2019-05-31 09:40:58 +02:00
parent 8d898ad667
commit 3e6cb2cb77
4 changed files with 54 additions and 7 deletions

View File

@@ -221,6 +221,8 @@ func CreateTargetPaths(d TargetPathDescriptor) (tp TargetPaths) {
link = pagePath
// TODO(bep) this should not happen after the fix in https://github.com/gohugoio/hugo/issues/4870
// but we may need some more testing before we can remove it.
if baseNameSameAsType {
link = strings.TrimSuffix(link, d.BaseName)
}