summaryrefslogtreecommitdiffstats
path: root/hugolib/paths/paths.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/paths/paths.go')
-rw-r--r--hugolib/paths/paths.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/paths/paths.go b/hugolib/paths/paths.go
index 83d5921e0..397dba3f8 100644
--- a/hugolib/paths/paths.go
+++ b/hugolib/paths/paths.go
@@ -87,12 +87,13 @@ func (p *Paths) AllModules() modules.Modules {
}
// GetBasePath returns any path element in baseURL if needed.
+// The path returned will have a leading, but no trailing slash.
func (p *Paths) GetBasePath(isRelativeURL bool) string {
if isRelativeURL && p.Cfg.CanonifyURLs() {
// The baseURL will be prepended later.
return ""
}
- return p.Cfg.BaseURL().BasePath
+ return p.Cfg.BaseURL().BasePathNoTrailingSlash
}
func (p *Paths) Lang() string {