hugolib: Final fix of rssURI deprecation
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 10 Apr 2017 19:26:55 +0000 (21:26 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 10 Apr 2017 19:26:55 +0000 (21:26 +0200)
Fixes #3319

hugolib/site_output.go

index 56009285d3e17f16b2ba88d34f7b5b3417cd9ef9..684ff2e73d1f7dc2932d2ce90e857ca6585f4f4c 100644 (file)
@@ -76,13 +76,11 @@ func createDefaultOutputFormats(cfg config.Provider) (map[string]output.Formats,
                        rssType := output.RSSFormat
 
                        rssBase := cfg.GetString("rssURI")
-                       if rssBase == "" {
+                       if rssBase == "" || rssBase == "index.xml" {
                                rssBase = rssType.BaseName
                        } else {
                                // Remove in Hugo 0.22.
-                               if rssBase != "index.xml" {
-                                       helpers.Deprecated("Site config", "rssURI", "Set baseName in outputFormats.RSS", false)
-                               }
+                               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))
                        }