aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-06-02 07:59:50 +0200
committerBjørn Erik Pedersen <[email protected]>2023-06-02 09:04:00 +0200
commit5e5ce00d419c02190662afc7eea6fbdea4d3062f (patch)
tree893ea9ed63b8da9a30593d0f73cb53fe76a6cb16 /hugolib/site.go
parenta191b38ac80356ee67caa28f6038a957150ba68d (diff)
downloadhugo-5e5ce00d419c02190662afc7eea6fbdea4d3062f.tar.gz
hugo-5e5ce00d419c02190662afc7eea6fbdea4d3062f.zip
Fix menuItem.URL when pageRef is not set
Fixes #11062
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index 19821e8b2..035f543ee 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -789,8 +789,10 @@ func (s *Site) assembleMenus() {
navigation.SetPageValues(me, p)
}
}
+ }
- } else {
+ // If page is still nill, we must make sure that we have a URL that considers baseURL etc.
+ if types.IsNil(me.Page) {
me.ConfiguredURL = s.createNodeMenuEntryURL(me.MenuConfig.URL)
}