hugolib: Only show rssUri deprecation WARNING if it is actually set

Fixes #3319
This commit is contained in:
Bjørn Erik Pedersen 2017-04-10 17:54:55 +02:00
parent 4c6fec56f1
commit cfd3af8e69

View 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))
}