commit 9ec00725b7685699a38d6fc926fdf0c5f15cc3e7
parent cfd3af8e691119461effa4385251b9d3818e2291
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Mon, 10 Apr 2017 21:26:55 +0200
hugolib: Final fix of rssURI deprecation
Fixes #3319
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hugolib/site_output.go b/hugolib/site_output.go
@@ -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))
}