Simplify page tree logic
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 3 Aug 2019 15:27:40 +0000 (17:27 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 8 Aug 2019 18:13:39 +0000 (20:13 +0200)
commit7ff0a8ee9fe8d710d407e57faf1fda43bd635f28
tree4baa7d913f735cc1089e465b51ff007014bfe25a
parentdf374851a0683f1446f33a4afef74c42f7d3eaaf
Simplify page tree logic

This is preparation for #6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.

Fixes #6154
Fixes #6153
Fixes #6152
33 files changed:
common/herrors/errors.go
common/maps/maps_get.go [new file with mode: 0644]
go.mod
go.sum
hugofs/rootmapping_fs.go
hugolib/hugo_sites.go
hugolib/hugo_sites_build.go
hugolib/hugo_sites_build_test.go
hugolib/hugo_sites_rebuild_test.go
hugolib/hugo_smoke_test.go
hugolib/page.go
hugolib/page__common.go
hugolib/page__data.go
hugolib/page__paginator.go
hugolib/page__per_output.go
hugolib/page__tree.go
hugolib/page_test.go
hugolib/pagebundler_test.go
hugolib/pagecollections.go
hugolib/pages_capture.go
hugolib/pages_map.go [new file with mode: 0644]
hugolib/site.go
hugolib/site_sections.go
hugolib/site_sections_test.go
hugolib/taxonomy.go
hugolib/taxonomy_test.go
hugolib/testhelpers_test.go
resources/page/page.go
resources/page/page_nop.go
resources/page/testhelpers_test.go
resources/page/weighted.go
tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/_default/rss.xml