Homepage now has all content available, use sorting and first to control rendering

This commit is contained in:
spf13 2013-11-14 09:37:58 -05:00
parent 13fa7cb748
commit ad2c0b5616

View file

@ -501,20 +501,12 @@ func (s *Site) RenderLists() error {
}
func (s *Site) RenderHomePage() error {
n := s.NewNode()
n.Title = n.Site.Title
n.Url = helpers.Urlize(string(n.Site.BaseUrl))
n.RSSlink = permalink(s, "index.xml")
n.Permalink = permalink(s, "")
if len(s.Pages) > 0 {
n.Date = s.Pages[0].Date
if len(s.Pages) < 9 {
n.Data["Pages"] = s.Pages
} else {
n.Data["Pages"] = s.Pages[:9]
}
}
err := s.render(n, "/", "index.html")
if err != nil {
return err