mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
5542f02fbc
commit
b3cb6788b2
35 changed files with 386 additions and 323 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue