hugolib: Exclude non-linkable pages from translations map

Fixes #9073
This commit is contained in:
Joe Mooring
2022-12-22 08:19:24 -08:00
committed by Bjørn Erik Pedersen
parent 59af05cabc
commit 37ab1cf12a
2 changed files with 85 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ func pagesToTranslationsMap(sites []*Site) map[string]page.Pages {
out := make(map[string]page.Pages)
for _, s := range sites {
s.pageMap.pageTrees.Walk(func(ss string, n *contentNode) bool {
s.pageMap.pageTrees.WalkLinkable(func(ss string, n *contentNode) bool {
p := n.p
// TranslationKey is implemented for all page types.
base := p.TranslationKey()