Add in-section Next/Prev content pointers

Conflicts:
	docs/content/meta/release-notes.md
	docs/content/templates/variables.md
This commit is contained in:
Dave Johnston
2014-04-18 07:23:13 +00:00
committed by bep
parent 837922d32b
commit a5f5106154
4 changed files with 17 additions and 0 deletions

View File

@@ -724,6 +724,15 @@ func (s *Site) assembleSections() {
for k := range s.Sections {
s.Sections[k].Sort()
for i, wp := range s.Sections[k] {
if i > 0 {
wp.Page.NextInSection = s.Sections[k][i - 1].Page;
}
if i < len(s.Sections[k]) - 1 {
wp.Page.PrevInSection = s.Sections[k][i + 1].Page;
}
}
}
}