Adding support for recent content.
authorspf13 <steve.francia@gmail.com>
Tue, 13 Aug 2013 12:43:42 +0000 (08:43 -0400)
committerspf13 <steve.francia@gmail.com>
Tue, 13 Aug 2013 12:43:42 +0000 (08:43 -0400)
hugolib/site.go

index 6e2a933c3c1df7681fb624cb71523e4ba7df8bc3..2f925ef022e466ae03fb8ecd11e4b7067ea05699 100644 (file)
@@ -206,7 +206,12 @@ func (s *Site) initialize() {
 
        filepath.Walk(s.Config.GetAbsPath(s.Config.ContentDir), walker)
 
-       s.Info = SiteInfo{BaseUrl: template.URL(s.Config.BaseUrl), Title: s.Config.Title, Config: &s.Config}
+       s.Info = SiteInfo{
+               BaseUrl: template.URL(s.Config.BaseUrl),
+               Title:   s.Config.Title,
+               Recent:  &s.Pages,
+               Config:  &s.Config,
+       }
 
        s.Shortcodes = make(map[string]ShortcodeFunc)
 }
@@ -471,9 +476,9 @@ func (s *Site) RenderLists() error {
                if a := s.Tmpl.Lookup("rss.xml"); a != nil {
                        // XML Feed
                        if s.Config.UglyUrls {
-                               n.Url = Urlize(section + ".xml")
+                               n.Url = Urlize(section + ".xml")
                        } else {
-                               n.Url = Urlize(section + "/" + "index.xml")
+                               n.Url = Urlize(section + "/" + "index.xml")
                        }
                        n.Permalink = template.HTML(string(n.Site.BaseUrl) + n.Url)
                        y := s.NewXMLBuffer()