Skip to content

Conversation

@ZJvandeWeg
Copy link
Member

The navTitle front matter was only applied when creating new navigation entries, which meant it wouldn't properly override for pages. This fix ensures navTitle is always applied to the actual page (last URL segment) in the hierarchy.

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

The navTitle front matter was only applied when creating new navigation
entries, which meant it wouldn't properly override for pages. This fix
ensures navTitle is always applied to the actual page (last URL segment)
in the hierarchy.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the navTitle front matter property was not being properly applied to existing navigation entries in the handbook/docs navigation hierarchy. The fix ensures that navTitle (and navGroup) are always applied to the actual page (the last URL segment) regardless of whether the navigation entry is being created or already exists.

  • Moved the navTitle and navGroup application logic outside the conditional that checks for new entries
  • Added a check to ensure these properties are only applied to the last segment (the actual page) in the hierarchy
  • This prevents intermediate directory names from being overridden while ensuring the actual page name is correctly set
Comments suppressed due to low confidence (1)

.eleventy.js:574

  • This fix for navTitle application lacks test coverage. Consider adding tests that verify:
  1. navTitle is correctly applied when a page entry already exists in the hierarchy (the bug this fixes)
  2. navTitle is correctly applied when creating new navigation entries (existing behavior)
  3. navTitle is only applied to the last segment of the hierarchy, not intermediate directories

This is particularly important since the navigation structure is a critical feature and this bug existed because the previous behavior wasn't tested.

                    if (i === hierarchy.length - 1) {
                        if (page.data.navTitle) {
                            accumulator[currentValue].name = page.data.navTitle
                        }
                        // TODO: navGroup will be used in the rendering of the ToC at a later stage
                        if (page.data.navGroup) {
                            accumulator[currentValue].group = page.data.navGroup
                        }
                    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit aa075ff
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/692dbf1ed377060008edf271
😎 Deploy Preview https://deploy-preview-4176--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 82 (🟢 up 21 from production)
Accessibility: 80 (no change from production)
Best Practices: 100 (🟢 up 8 from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Yndira-E
Copy link
Contributor

Yndira-E commented Dec 1, 2025

@ZJvandeWeg could you point to an example? I tested an older PR and updating navTitle worked, so I want to make sure I’m checking the right case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants