From da54787cfa97789624e467a4451dfeb50f563e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 19 Feb 2020 08:38:46 +0100 Subject: Handle disabled RSS even if it's defined in outputs See https://github.com/gohugoio/hugo/issues/6897#issuecomment-587947078 --- hugolib/site.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hugolib/site.go') diff --git a/hugolib/site.go b/hugolib/site.go index 34e5ad156..ac67c1210 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -432,7 +432,8 @@ func newSite(cfg deps.DepsCfg) (*Site, error) { return nil, err } - if disabledKinds[kindRSS] { + rssDisabled := disabledKinds[kindRSS] + if rssDisabled { // Legacy tmp := siteOutputFormatsConfig[:0] for _, x := range siteOutputFormatsConfig { @@ -443,7 +444,7 @@ func newSite(cfg deps.DepsCfg) (*Site, error) { siteOutputFormatsConfig = tmp } - outputFormats, err := createSiteOutputFormats(siteOutputFormatsConfig, cfg.Language) + outputFormats, err := createSiteOutputFormats(siteOutputFormatsConfig, cfg.Language, rssDisabled) if err != nil { return nil, err } -- cgit v1.2.3