aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/content_map_page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-03-15 16:21:25 +0100
committerBjørn Erik Pedersen <[email protected]>2024-03-15 16:54:18 +0100
commit68d92ef9ddbb63340d71af0cb30e6fb7c4912c65 (patch)
treeb84138bfc016ba854b5020d1560ca2ed165ce233 /hugolib/content_map_page.go
parentb40f3c7df6bc89efaaadddec7d2cc291557b2ee9 (diff)
downloadhugo-68d92ef9ddbb63340d71af0cb30e6fb7c4912c65.tar.gz
hugo-68d92ef9ddbb63340d71af0cb30e6fb7c4912c65.zip
Fix translationKey handling for term pages
Fixes #12261
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r--hugolib/content_map_page.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go
index 906fced77..64a15a59a 100644
--- a/hugolib/content_map_page.go
+++ b/hugolib/content_map_page.go
@@ -1500,13 +1500,6 @@ func (sa *sitePagesAssembler) assembleTermsAndTranslations() error {
return false, nil
}
- // This is a little out of place, but is conveniently put here.
- // Check if translationKey is set by user.
- // This is to support the manual way of setting the translationKey in front matter.
- if ps.m.pageConfig.TranslationKey != "" {
- sa.s.h.translationKeyPages.Append(ps.m.pageConfig.TranslationKey, ps)
- }
-
if sa.pageMap.cfg.taxonomyTermDisabled {
return false, nil
}
@@ -1587,6 +1580,13 @@ func (sa *sitePagesAssembler) assembleResources() error {
Handle: func(s string, n contentNodeI, match doctree.DimensionFlag) (bool, error) {
ps := n.(*pageState)
+ // This is a little out of place, but is conveniently put here.
+ // Check if translationKey is set by user.
+ // This is to support the manual way of setting the translationKey in front matter.
+ if ps.m.pageConfig.TranslationKey != "" {
+ sa.s.h.translationKeyPages.Append(ps.m.pageConfig.TranslationKey, ps)
+ }
+
// Prepare resources for this page.
ps.shiftToOutputFormat(true, 0)
targetPaths := ps.targetPaths()