node to page: Temporary set RSS date to zero

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen 2016-11-20 12:21:19 +01:00
parent 0bbdcf24fe
commit f776af6c9b

View file

@ -18,6 +18,7 @@ import (
"path"
"path/filepath"
"sync"
"time"
bp "github.com/spf13/hugo/bufferpool"
"github.com/spf13/hugo/helpers"
@ -140,6 +141,15 @@ func (s *Site) renderRSS(p *Page) error {
rssPage := p.copy()
rssPage.Kind = kindRSS
// TODO(bep) we zero the date here to get the number of diffs down in
// testing. But this should be set back later; the RSS feed should
// inherit the publish date from the node it represents.
if p.Kind == KindTaxonomy {
var zeroDate time.Time
rssPage.Date = zeroDate
}
high := 50
if len(rssPage.Pages) > high {
rssPage.Pages = rssPage.Pages[:high]