diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-04-08 10:45:11 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-04-08 10:46:13 +0200 |
commit | 9e69a92e85937c6e59839e58937ed1db1e497557 (patch) | |
tree | efe0887df1ec34f4010ff222a0085b852bb63982 /hugolib/site_output.go | |
parent | 9a8b65d8d704296be6db3d39a1e3cf6458233995 (diff) | |
download | hugo-9e69a92e85937c6e59839e58937ed1db1e497557.tar.gz hugo-9e69a92e85937c6e59839e58937ed1db1e497557.zip |
hugolib: Deprecate rssURI
Diffstat (limited to 'hugolib/site_output.go')
-rw-r--r-- | hugolib/site_output.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/hugolib/site_output.go b/hugolib/site_output.go index acd5d1cd1..f321848e3 100644 --- a/hugolib/site_output.go +++ b/hugolib/site_output.go @@ -20,6 +20,7 @@ import ( "github.com/spf13/cast" "github.com/spf13/hugo/config" + "github.com/spf13/hugo/helpers" "github.com/spf13/hugo/output" ) @@ -72,15 +73,18 @@ func createDefaultOutputFormats(cfg config.Provider) (map[string]output.Formats, // All but page have RSS if kind != KindPage { - // TODO(bep) output deprecate rssURI + rssType := output.RSSFormat + rssBase := cfg.GetString("rssURI") if rssBase == "" { - rssBase = "index" + rssBase = rssType.BaseName + } else { + // Remove in Hugo 0.22. + 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)) } - // RSS has now a well defined media type, so strip any suffix provided - rssBase = strings.TrimSuffix(rssBase, path.Ext(rssBase)) - rssType := output.RSSFormat rssType.BaseName = rssBase formats = append(formats, rssType) |