mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Fixing bug where only the first index list was created.
This commit is contained in:
parent
2aaf92b515
commit
d829e05036
1 changed files with 7 additions and 4 deletions
|
@ -160,8 +160,9 @@ func (s *Site) Render() (err error) {
|
||||||
if err = s.RenderIndexes(); err != nil {
|
if err = s.RenderIndexes(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.RenderIndexesIndexes()
|
|
||||||
s.timerStep("render and write indexes")
|
s.timerStep("render and write indexes")
|
||||||
|
s.RenderIndexesIndexes()
|
||||||
|
s.timerStep("render & write index indexes")
|
||||||
s.RenderLists()
|
s.RenderLists()
|
||||||
s.timerStep("render and write lists")
|
s.timerStep("render and write lists")
|
||||||
if err = s.RenderPages(); err != nil {
|
if err = s.RenderPages(); err != nil {
|
||||||
|
@ -303,8 +304,8 @@ func (s *Site) BuildSiteMeta() (err error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range s.Pages {
|
for i, p := range s.Pages {
|
||||||
s.Sections.Add(p.Section, p)
|
s.Sections.Add(p.Section, s.Pages[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, _ := range s.Sections {
|
for k, _ := range s.Sections {
|
||||||
|
@ -484,7 +485,9 @@ func (s *Site) RenderLists() error {
|
||||||
y := s.NewXMLBuffer()
|
y := s.NewXMLBuffer()
|
||||||
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)
|
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)
|
||||||
err = s.WritePublic(section+"/index.xml", y)
|
err = s.WritePublic(section+"/index.xml", y)
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue