hugolib: Respect disableRSS
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 6 Dec 2016 08:32:14 +0000 (09:32 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 6 Dec 2016 08:32:14 +0000 (09:32 +0100)
Fixes #2764

hugolib/site_render.go

index 94fccd9504e9f054d790f58fd0ccf43bea8676d1..a9d714c1c9f9c3d3271e6073409971873bd70756 100644 (file)
@@ -132,6 +132,11 @@ func (s *Site) renderPaginator(p *Page) error {
 }
 
 func (s *Site) renderRSS(p *Page) error {
+
+       if viper.GetBool("disableRSS") {
+               return nil
+       }
+
        layouts := p.rssLayouts()
 
        if layouts == nil {