mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
hugolib: Make the RSS feed use the date for the node it represents
Closes #2708
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/spf13/hugo/helpers"
|
"github.com/spf13/hugo/helpers"
|
||||||
|
|
||||||
@@ -208,14 +207,6 @@ func (s *Site) renderRSS(p *PageOutput) error {
|
|||||||
|
|
||||||
p.Kind = kindRSS
|
p.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
|
|
||||||
p.Date = zeroDate
|
|
||||||
}
|
|
||||||
|
|
||||||
limit := s.Cfg.GetInt("rssLimit")
|
limit := s.Cfg.GetInt("rssLimit")
|
||||||
if limit >= 0 && len(p.Pages) > limit {
|
if limit >= 0 && len(p.Pages) > limit {
|
||||||
p.Pages = p.Pages[:limit]
|
p.Pages = p.Pages[:limit]
|
||||||
|
Reference in New Issue
Block a user