summaryrefslogtreecommitdiffstats
path: root/hugolib/pagecollections.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-18 10:27:27 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-18 10:55:00 +0200
commit93aad3c543828efca2adeb7f96cf50ae29878593 (patch)
tree6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /hugolib/pagecollections.go
parent5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff)
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/pagecollections.go')
-rw-r--r--hugolib/pagecollections.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/pagecollections.go b/hugolib/pagecollections.go
index 2e4287612..623d5de42 100644
--- a/hugolib/pagecollections.go
+++ b/hugolib/pagecollections.go
@@ -20,6 +20,8 @@ import (
"strings"
"sync"
+ "github.com/gohugoio/hugo/common/paths"
+
"github.com/gohugoio/hugo/hugofs/files"
"github.com/gohugoio/hugo/helpers"
@@ -187,7 +189,7 @@ func (c *PageCollections) getSectionOrPage(ref string) (*contentNode, string) {
langSuffix := "." + m.s.Lang()
// Trim both extension and any language code.
- name := helpers.PathNoExt(filename)
+ name := paths.PathNoExt(filename)
name = strings.TrimSuffix(name, langSuffix)
// These are reserved bundle names and will always be stored by their owning