Skip to content

Commit

Permalink
hugolib: Final fix of rssURI deprecation
Browse files Browse the repository at this point in the history
Fixes #3319
  • Loading branch information
bep committed Apr 10, 2017
1 parent cfd3af8 commit 9ec0072
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hugolib/site_output.go
Expand Up @@ -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))
}
Expand Down

0 comments on commit 9ec0072

Please sign in to comment.