summaryrefslogtreecommitdiffstats
path: root/hugolib/site_output.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/site_output.go
parent5542f02fbc4c9467a4338ee1ce2e741f480a0751 (diff)
Move all Kind constants to its own package
See #11256
Diffstat (limited to 'hugolib/site_output.go')
-rw-r--r--hugolib/site_output.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/hugolib/site_output.go b/hugolib/site_output.go
index 1e248baff..d6f55cbdd 100644
--- a/hugolib/site_output.go
+++ b/hugolib/site_output.go
@@ -18,7 +18,7 @@ import (
"strings"
"github.com/gohugoio/hugo/output"
- "github.com/gohugoio/hugo/resources/page"
+ "github.com/gohugoio/hugo/resources/kinds"
"github.com/spf13/cast"
)
@@ -34,20 +34,20 @@ func createDefaultOutputFormats(allFormats output.Formats) map[string]output.For
}
m := map[string]output.Formats{
- page.KindPage: {htmlOut},
- page.KindHome: defaultListTypes,
- page.KindSection: defaultListTypes,
- page.KindTerm: defaultListTypes,
- page.KindTaxonomy: defaultListTypes,
+ kinds.KindPage: {htmlOut},
+ kinds.KindHome: defaultListTypes,
+ kinds.KindSection: defaultListTypes,
+ kinds.KindTerm: defaultListTypes,
+ kinds.KindTaxonomy: defaultListTypes,
// Below are for consistency. They are currently not used during rendering.
- kindSitemap: {sitemapOut},
- kindRobotsTXT: {robotsOut},
- kind404: {htmlOut},
+ kinds.KindSitemap: {sitemapOut},
+ kinds.KindRobotsTXT: {robotsOut},
+ kinds.Kind404: {htmlOut},
}
// May be disabled
if rssFound {
- m[kindRSS] = output.Formats{rssOut}
+ m[kinds.KindRSS] = output.Formats{rssOut}
}
return m
@@ -69,7 +69,7 @@ func createSiteOutputFormats(allFormats output.Formats, outputs map[string]any,
seen := make(map[string]bool)
for k, v := range outputs {
- k = getKind(k)
+ k = kinds.GetKindAny(k)
if k == "" {
// Invalid kind
continue