Add support for weighted pages

Now pages can be sorted by other than date
This commit is contained in:
spf13
2013-10-18 11:01:31 -04:00
parent 90090175f8
commit 3558e3d6f0
4 changed files with 92 additions and 4 deletions

View File

@@ -310,7 +310,7 @@ func (s *Site) BuildSiteMeta() (err error) {
}
for i, p := range s.Pages {
s.Sections.Add(p.Section, WeightedIndexEntry{0, s.Pages[i]})
s.Sections.Add(p.Section, WeightedIndexEntry{s.Pages[i].Weight, s.Pages[i]})
}
for k, _ := range s.Sections {