mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Add support for weighted pages
Now pages can be sorted by other than date
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user