Set Date and Lastmod for main home page
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 27 Feb 2016 22:21:07 +0000 (23:21 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 27 Feb 2016 22:21:07 +0000 (23:21 +0100)
Fixes #1903

hugolib/site.go

index 0fb2f71f6bac6d6512cce16c60a024ba8128bdd3..acf8bb10b16fa4af1148386cc6cdb0668fb398d7 100644 (file)
@@ -1711,6 +1711,8 @@ func (s *Site) newHomeNode() *Node {
        n.IsHome = true
        s.setURLs(n, "/")
        n.Data["Pages"] = s.Pages
+       n.Date = s.Pages[0].Date
+       n.Lastmod = s.Pages[0].Lastmod
        return n
 }