hugolib: Only show rssUri deprecation WARNING if it is actually set
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 10 Apr 2017 15:54:55 +0000 (17:54 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 10 Apr 2017 15:54:55 +0000 (17:54 +0200)
Fixes #3319

hugolib/site_output.go

index f321848e31ac06efeffb30511f2f774cfdc005b9..56009285d3e17f16b2ba88d34f7b5b3417cd9ef9 100644 (file)
@@ -80,7 +80,9 @@ func createDefaultOutputFormats(cfg config.Provider) (map[string]output.Formats,
                                rssBase = rssType.BaseName
                        } else {
                                // Remove in Hugo 0.22.
-                               helpers.Deprecated("Site config", "rssURI", "Set baseName in outputFormats.RSS", false)
+                               if rssBase != "index.xml" {
+                                       helpers.Deprecated("Site config", "rssURI", "Set baseName in outputFormats.RSS", false)
+                               }
                                // RSS has now a well defined media type, so strip any suffix provided
                                rssBase = strings.TrimSuffix(rssBase, path.Ext(rssBase))
                        }