mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
976f8f84bf
commit
0eb5f54d30
1 changed files with 11 additions and 0 deletions
|
@ -295,12 +295,23 @@ func (h *HugoSites) createMissingPages() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(newPages) > 0 {
|
if len(newPages) > 0 {
|
||||||
|
// This resorting is unfortunate, but it also needs to be sorted
|
||||||
|
// when sections are created.
|
||||||
first := h.Sites[0]
|
first := h.Sites[0]
|
||||||
|
|
||||||
first.AllPages = append(first.AllPages, newPages...)
|
first.AllPages = append(first.AllPages, newPages...)
|
||||||
|
|
||||||
|
first.AllPages.Sort()
|
||||||
|
|
||||||
|
for _, s := range h.Sites {
|
||||||
|
s.Pages.Sort()
|
||||||
|
}
|
||||||
|
|
||||||
for i := 1; i < len(h.Sites); i++ {
|
for i := 1; i < len(h.Sites); i++ {
|
||||||
h.Sites[i].AllPages = first.AllPages
|
h.Sites[i].AllPages = first.AllPages
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue