diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-05 10:19:55 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-05 11:22:03 +0200 |
commit | de87624241daa86660f205cc72a745409b9c9238 (patch) | |
tree | 361e6ae2c801bd400bf9d1de8c9fda64c5750dca /hugolib/site_output.go | |
parent | 9ef4dca361727a78e0f66f8f4e54c64e4c4781cb (diff) |
hugolib: Fix output format handling of mix cased page kinds
Fixes #4528
Diffstat (limited to 'hugolib/site_output.go')
-rw-r--r-- | hugolib/site_output.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hugolib/site_output.go b/hugolib/site_output.go index 9fb236506..b0a5d4f35 100644 --- a/hugolib/site_output.go +++ b/hugolib/site_output.go @@ -34,7 +34,7 @@ func createDefaultOutputFormats(allFormats output.Formats, cfg config.Provider) page.KindSection: {htmlOut, rssOut}, page.KindTaxonomy: {htmlOut, rssOut}, page.KindTaxonomyTerm: {htmlOut, rssOut}, - // Below are for conistency. They are currently not used during rendering. + // Below are for consistency. They are currently not used during rendering. kindRSS: {rssOut}, kindSitemap: {sitemapOut}, kindRobotsTXT: {robotsOut}, @@ -61,6 +61,11 @@ func createSiteOutputFormats(allFormats output.Formats, cfg config.Provider) (ma seen := make(map[string]bool) for k, v := range outputs { + k = getKind(k) + if k == "" { + // Invalid kind + continue + } var formats output.Formats vals := cast.ToStringSlice(v) for _, format := range vals { |