Move all Kind constants to its own package

See #11256
This commit is contained in:
Bjørn Erik Pedersen
2023-07-28 10:53:47 +02:00
parent 5542f02fbc
commit b3cb6788b2
35 changed files with 386 additions and 323 deletions

View File

@@ -18,6 +18,7 @@ import (
"strings"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/resources/kinds"
"github.com/gohugoio/hugo/resources/page"
)
@@ -166,7 +167,7 @@ func (pt pageTree) Parent() page.Page {
tree := p.getTreeRef()
if tree == nil || pt.p.Kind() == page.KindTaxonomy {
if tree == nil || pt.p.Kind() == kinds.KindTaxonomy {
return pt.p.s.home
}