Fix bug in Site.assembleSections method
authorVas Sudanagunta <vas@commonkarma.org>
Sun, 25 Feb 2018 06:15:03 +0000 (01:15 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 25 Feb 2018 09:34:24 +0000 (10:34 +0100)
commit00868081f624928d773a7b698654766f8cd70069
tree36ef114cc19ffa5f9025c6e2594d4b17ae327315
parente9750d831f749afa928d8a099af5889d18cb2484
Fix bug in Site.assembleSections method

Site.assembleSections logic assumes that the the home page would always be the first in the Site's list of pages. This is not in fact guaranteed to be true. When it is not, the method can fail to set the parent for some or all root-level pages. 

Fixes #4447
hugolib/site_sections.go