aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-06-18 10:27:27 +0200
committerBjørn Erik Pedersen <[email protected]>2021-06-18 10:55:00 +0200
commit93aad3c543828efca2adeb7f96cf50ae29878593 (patch)
tree6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /hugolib/site.go
parent5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff)
downloadhugo-93aad3c543828efca2adeb7f96cf50ae29878593.tar.gz
hugo-93aad3c543828efca2adeb7f96cf50ae29878593.zip
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles. Updates #8654
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index 9921dcc97..2e23368d7 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -29,6 +29,8 @@ import (
"strings"
"time"
+ "github.com/gohugoio/hugo/common/paths"
+
"github.com/gohugoio/hugo/common/constants"
"github.com/gohugoio/hugo/common/loggers"
@@ -1418,7 +1420,7 @@ func (s *SiteInfo) createNodeMenuEntryURL(in string) string {
menuEntryURL := in
menuEntryURL = helpers.SanitizeURLKeepTrailingSlash(s.s.PathSpec.URLize(menuEntryURL))
if !s.canonifyURLs {
- menuEntryURL = helpers.AddContextRoot(s.s.PathSpec.BaseURL.String(), menuEntryURL)
+ menuEntryURL = paths.AddContextRoot(s.s.PathSpec.BaseURL.String(), menuEntryURL)
}
return menuEntryURL
}