mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Complete refactor of indexes, move (and rewrite) page sorting to page.go, add tests
This commit is contained in:
@@ -315,7 +315,7 @@ func (s *Site) BuildSiteMeta() (err error) {
|
||||
v, ok := vals.([]string)
|
||||
if ok {
|
||||
for _, idx := range v {
|
||||
x := WeightedIndexEntry{weight.(int), p}
|
||||
x := WeightedPage{weight.(int), p}
|
||||
|
||||
s.Indexes[plural].Add(idx, x)
|
||||
}
|
||||
@@ -332,7 +332,7 @@ func (s *Site) BuildSiteMeta() (err error) {
|
||||
}
|
||||
|
||||
for i, p := range s.Pages {
|
||||
s.Sections.Add(p.Section, WeightedIndexEntry{s.Pages[i].Weight, s.Pages[i]})
|
||||
s.Sections.Add(p.Section, WeightedPage{s.Pages[i].Weight, s.Pages[i]})
|
||||
}
|
||||
|
||||
for k := range s.Sections {
|
||||
|
Reference in New Issue
Block a user