summaryrefslogtreecommitdiffstats
path: root/hugolib/page_kinds.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-28 10:53:47 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-07-28 15:14:23 +0200
commitb3cb6788b2634a89ae774895f345f082020b52d8 (patch)
tree08eadc21d9308510e332a4898d2c06516cb6e497 /hugolib/page_kinds.go
parent5542f02fbc4c9467a4338ee1ce2e741f480a0751 (diff)
Move all Kind constants to its own package
See #11256
Diffstat (limited to 'hugolib/page_kinds.go')
-rw-r--r--hugolib/page_kinds.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/hugolib/page_kinds.go b/hugolib/page_kinds.go
index 6536ad6bb..9bdf689d7 100644
--- a/hugolib/page_kinds.go
+++ b/hugolib/page_kinds.go
@@ -13,40 +13,6 @@
package hugolib
-import (
- "strings"
-
- "github.com/gohugoio/hugo/resources/page"
-)
-
-// This is all the kinds we can expect to find in .Site.Pages.
-var allKindsInPages = []string{page.KindPage, page.KindHome, page.KindSection, page.KindTerm, page.KindTaxonomy}
-
const (
-
- // Temporary state.
- kindUnknown = "unknown"
-
- // The following are (currently) temporary nodes,
- // i.e. nodes we create just to render in isolation.
- kindRSS = "rss"
- kindSitemap = "sitemap"
- kindRobotsTXT = "robotstxt"
- kind404 = "404"
-
pageResourceType = "page"
)
-
-var kindMap = map[string]string{
- strings.ToLower(kindRSS): kindRSS,
- strings.ToLower(kindSitemap): kindSitemap,
- strings.ToLower(kindRobotsTXT): kindRobotsTXT,
- strings.ToLower(kind404): kind404,
-}
-
-func getKind(s string) string {
- if pkind := page.GetKind(s); pkind != "" {
- return pkind
- }
- return kindMap[strings.ToLower(s)]
-}