diff options
Diffstat (limited to 'hugolib/site_sections.go')
-rw-r--r-- | hugolib/site_sections.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/hugolib/site_sections.go b/hugolib/site_sections.go index 5de350b2f..c8bca03e3 100644 --- a/hugolib/site_sections.go +++ b/hugolib/site_sections.go @@ -161,18 +161,12 @@ func (s *Site) assembleSections() Pages { ) var ( - home *Page inPages = radix.New().Txn() inSections = radix.New().Txn() undecided Pages ) - homes := s.findPagesByKind(KindHome) - if len(homes) == 1 { - home = homes[0] - } else if len(homes) > 1 { - panic("Too many homes") - } + home := s.findFirstPageByKindIn(KindHome, s.Pages) for i, p := range s.Pages { if p.Kind != KindPage { |