hugolib: Fix taxonomies vs expired

In Hugo 0.57 we needed to delay the page metadata initialization until we had built the page graph.

This introduced a regression in that we now created taxonomy entries for expired pages.

This fixes that by moving the "should not build" filter before we assemble the taxonomies.

Fixes #6213
This commit is contained in:
Bjørn Erik Pedersen
2019-08-15 09:47:25 +02:00
parent ea9261e856
commit 9475f61a37
3 changed files with 43 additions and 8 deletions

View File

@@ -466,14 +466,6 @@ func (c *PageCollections) createWorkAllPages() error {
}
}
tmp := bucket.pages[:0]
for _, x := range bucket.pages {
if c.pagesMap.s.shouldBuild(x) {
tmp = append(tmp, x)
}
}
bucket.pages = tmp
if bucket.isEmpty() {
if bucket.owner.IsSection() && bucket.owner.File().IsZero() {
// Check for any nested section.