mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
0bbdcf24fe
commit
f776af6c9b
1 changed files with 10 additions and 0 deletions
|
@ -18,6 +18,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
bp "github.com/spf13/hugo/bufferpool"
|
bp "github.com/spf13/hugo/bufferpool"
|
||||||
"github.com/spf13/hugo/helpers"
|
"github.com/spf13/hugo/helpers"
|
||||||
|
@ -140,6 +141,15 @@ func (s *Site) renderRSS(p *Page) error {
|
||||||
|
|
||||||
rssPage := p.copy()
|
rssPage := p.copy()
|
||||||
rssPage.Kind = kindRSS
|
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
|
high := 50
|
||||||
if len(rssPage.Pages) > high {
|
if len(rssPage.Pages) > high {
|
||||||
rssPage.Pages = rssPage.Pages[:high]
|
rssPage.Pages = rssPage.Pages[:high]
|
||||||
|
|
Loading…
Reference in a new issue