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

@@ -20,6 +20,7 @@ import (
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs/files"
"github.com/gohugoio/hugo/resources/kinds"
"github.com/gohugoio/hugo/resources/page"
)
@@ -125,7 +126,7 @@ func createTargetPathDescriptor(s *Site, p page.Page, pm *pageMeta) (page.Target
baseName = contentBaseName
}
alwaysInSubDir := p.Kind() == kindSitemap
alwaysInSubDir := p.Kind() == kinds.KindSitemap
desc := page.TargetPathDescriptor{
PathSpec: d.PathSpec,