mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles. Updates #8654
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user