Fix Permalink for resource, baseURL with path and canonifyURLs set

Fixes #5226
This commit is contained in:
Bjørn Erik Pedersen 2018-11-15 13:35:28 +01:00
parent 12742bac71
commit 5df2b79dd2
10 changed files with 212 additions and 198 deletions

View file

@ -69,11 +69,9 @@ func NewPathSpecWithBaseBaseFsProvided(fs *hugofs.Fs, cfg config.Provider, baseB
ProcessingStats: NewProcessingStats(p.Lang()),
}
if !ps.CanonifyURLs {
basePath := ps.BaseURL.Path()
if basePath != "" && basePath != "/" {
ps.BasePath = basePath
}
basePath := ps.BaseURL.Path()
if basePath != "" && basePath != "/" {
ps.BasePath = basePath
}
return ps, nil