Fix WeightedPages in union etc.

We introduced a callback func() to get the owner Page in 0.55.0.

Sadly, funcs is  not comparable type in Go.

This commit replaces the func with a struct pointer that wraps the Page.

Fixes #5850
This commit is contained in:
Bjørn Erik Pedersen
2019-04-13 11:40:51 +02:00
parent e85c057f99
commit f2795d4d2c
4 changed files with 46 additions and 14 deletions

View File

@@ -1584,7 +1584,7 @@ func (s *Site) assembleTaxonomies() error {
// last one will win, e.g. "hugo" vs "Hugo".
n.term = term
w := page.NewWeightedPage(weight, p, n.getOwner)
w := page.NewWeightedPage(weight, p, n.owner)
s.Taxonomies[plural].add(key, w)