mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-15 03:14:02 +00:00
parent
cfd3af8e69
commit
9ec00725b7
1 changed files with 2 additions and 4 deletions
|
@ -76,13 +76,11 @@ func createDefaultOutputFormats(cfg config.Provider) (map[string]output.Formats,
|
||||||
rssType := output.RSSFormat
|
rssType := output.RSSFormat
|
||||||
|
|
||||||
rssBase := cfg.GetString("rssURI")
|
rssBase := cfg.GetString("rssURI")
|
||||||
if rssBase == "" {
|
if rssBase == "" || rssBase == "index.xml" {
|
||||||
rssBase = rssType.BaseName
|
rssBase = rssType.BaseName
|
||||||
} else {
|
} else {
|
||||||
// Remove in Hugo 0.22.
|
// 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
|
// RSS has now a well defined media type, so strip any suffix provided
|
||||||
rssBase = strings.TrimSuffix(rssBase, path.Ext(rssBase))
|
rssBase = strings.TrimSuffix(rssBase, path.Ext(rssBase))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue