Skip to content

Fix missing navigation menu on local website#14

Merged
dcasota merged 1 commit into
masterfrom
fix/navigation-menu-missing
Nov 23, 2025
Merged

Fix missing navigation menu on local website#14
dcasota merged 1 commit into
masterfrom
fix/navigation-menu-missing

Conversation

@dcasota
Copy link
Copy Markdown
Owner

@dcasota dcasota commented Nov 23, 2025

Problem

The local website was missing the navigation menu (Home, Blog, Features, Contribute, Docs, Github) that appears on the reference site at https://vmware.github.io/photon/.

Solution

Updated installer.sh to configure all 6 menu items in config.toml during installation, ensuring the local site matches the reference site's navigation structure.

Changes

  • Added Home menu item pointing to /
  • Added Features menu item with anchor #features
  • Added Contribute menu item with anchor #contributing
  • Changed Release to Github pointing to main repository
  • Updated menu weights for proper ordering (10, 20, 30, 40, 50, 60)

Testing

Verified menu appears correctly on all pages:

  • ✅ Homepage (/)
  • ✅ Blog (/blog/)
  • ✅ Docs (/docs/)
  • ✅ Docs v3 (/docs-v3/)
  • ✅ Docs v4 (/docs-v4/)
  • ✅ Docs v5 (/docs-v5/)

Screenshots

Before: Menu was completely missing
After: Menu shows: Home | Blog | Features | Contribute | Docs | Github

The local website was missing the navigation menu (Home, Blog, Features,
Contribute, Docs, Github) that appears on the reference site at
https://vmware.github.io/photon/.

This fix updates installer.sh to configure all 6 menu items in config.toml
during installation, ensuring the local site matches the reference site's
navigation structure.

Changes:
- Added Home menu item pointing to /
- Added Features menu item with anchor #features
- Added Contribute menu item with anchor #contributing
- Changed Release to Github pointing to main repository
- Updated menu weights for proper ordering (10, 20, 30, 40, 50, 60)

Tested on all pages: /, /blog/, /docs/, /docs-v3/, /docs-v4/, /docs-v5/

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@dcasota dcasota merged commit 05e6cd8 into master Nov 23, 2025
dcasota pushed a commit that referenced this pull request Nov 23, 2025
The previous awk command in PR #14 had a logic flaw that didn't properly
remove all menu configuration blocks, causing menus to disappear on
reinstallation.

Root cause:
- The old awk pattern stopped skipping at the first empty line
- This left partial menu blocks that interfered with new menu additions
- Multiple reinstalls would accumulate broken menu configurations

Fix:
- Implemented proper stateful awk logic with in_menu and in_block flags
- Correctly removes '# Menu configuration' header and all [[menu.main]] blocks
- Handles all menu properties (name, weight, url, identifier, pre, post)
- Stops removal only when encountering new section markers (# or [)

Tested with sample config.toml containing menu blocks - cleanly removes all
menu configuration while preserving other sections.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
dcasota pushed a commit that referenced this pull request Nov 23, 2025
Root cause analysis:
- PR #14 and #15 added navigation menu to installer.sh config.toml
- installer-weblinkfixes.sh runs AFTER installer.sh
- Line 314 used 'sed -i /^\[permalinks\]/,$d' which deletes from [permalinks] to EOF
- This deleted the menu configuration that was added earlier

Impact:
- Navigation menu (Home, Blog, Features, Contribute, Docs, Github) disappeared
- Affected all pages: /, /blog/, /docs/, /docs-v3/, /docs-v4/, /docs-v5/

Fix:
- Replaced sed deletion with stateful awk logic
- Now removes only [permalinks] section and its properties
- Preserves all content after [permalinks] including menu configuration
- Uses same pattern as installer.sh menu removal logic

Tested with sample config.toml containing [params], [params.ui], menu
configuration, [permalinks], and [other] sections. Verified menu
configuration is preserved after [permalinks] removal.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@dcasota dcasota deleted the fix/navigation-menu-missing branch November 30, 2025 01:48
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.

1 participant