diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-09-21 14:30:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-09-21 14:30:57 +0200 |
commit | f1a00b2069ede85feb487d29b9f690396e2402c6 (patch) | |
tree | d61f788db87ed20cef267a03386996201ca94680 | |
parent | df4cbbd3bdc05aa14a67b3a0a29a0db75b82e640 (diff) | |
download | hugo-f1a00b2069ede85feb487d29b9f690396e2402c6.tar.gz hugo-f1a00b2069ede85feb487d29b9f690396e2402c6.zip |
hugolib: Remove deprecated rssURI
-rw-r--r-- | hugolib/config.go | 4 | ||||
-rw-r--r-- | hugolib/rss_test.go | 3 | ||||
-rw-r--r-- | hugolib/site_output.go | 17 |
3 files changed, 3 insertions, 21 deletions
diff --git a/hugolib/config.go b/hugolib/config.go index 122bd3f1e..3a0e665c1 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -471,7 +471,7 @@ func loadDefaultSettingsFor(v *viper.Viper) error { v.SetDefault("disableFastRender", false) v.SetDefault("timeout", 10000) // 10 seconds - // Remove in Hugo 0.39 + // Remove in Hugo 0.50 if v.GetBool("useModTimeAsFallback") { @@ -480,7 +480,7 @@ func loadDefaultSettingsFor(v *viper.Viper) error { [frontmatter] date = [ "date",":fileModTime", ":default"] lastmod = ["lastmod" ,":fileModTime", ":default"] -`, false) +`, true) } diff --git a/hugolib/rss_test.go b/hugolib/rss_test.go index d02d98a21..db26c7d2d 100644 --- a/hugolib/rss_test.go +++ b/hugolib/rss_test.go @@ -30,10 +30,9 @@ func TestRSSOutput(t *testing.T) { rssLimit := len(weightedSources) - 1 - rssURI := "customrss.xml" + rssURI := "index.xml" cfg.Set("baseURL", "http://auth/bub/") - cfg.Set("rssURI", rssURI) cfg.Set("title", "RSSTest") cfg.Set("rssLimit", rssLimit) diff --git a/hugolib/site_output.go b/hugolib/site_output.go index f81162e43..0e0fe76a7 100644 --- a/hugolib/site_output.go +++ b/hugolib/site_output.go @@ -15,11 +15,8 @@ package hugolib import ( "fmt" - "path" - "strings" "github.com/gohugoio/hugo/config" - "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/hugo/output" "github.com/spf13/cast" ) @@ -30,20 +27,6 @@ func createDefaultOutputFormats(allFormats output.Formats, cfg config.Provider) robotsOut, _ := allFormats.GetByName(output.RobotsTxtFormat.Name) sitemapOut, _ := allFormats.GetByName(output.SitemapFormat.Name) - // TODO(bep) this mumbo jumbo is deprecated and should be removed, but there are tests that - // depends on this, so that will have to wait. - rssBase := cfg.GetString("rssURI") - if rssBase == "" || rssBase == "index.xml" { - rssBase = rssOut.BaseName - } else { - // Remove in Hugo 0.36. - helpers.Deprecated("Site config", "rssURI", "Set baseName in outputFormats.RSS", true) - // RSS has now a well defined media type, so strip any suffix provided - rssBase = strings.TrimSuffix(rssBase, path.Ext(rssBase)) - } - - rssOut.BaseName = rssBase - return map[string]output.Formats{ KindPage: output.Formats{htmlOut}, KindHome: output.Formats{htmlOut, rssOut}, |