Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-20 14:21:19 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-22 11:57:03 +0300
commitf776af6c9b6c860dda3680e73c1b8994c2c00735 (patch)
treecdb124f73714bf6912872d01bf8d58d3a9f16390 /hugolib
parent0bbdcf24feb6a1c0c7bdbabf504bd2e270ca81a6 (diff)
node to page: Temporary set RSS date to zero
Updates #2297
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/site_render.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index 292926529..b931353ae 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -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]