website icon indicating copy to clipboard operation
website copied to clipboard

Use frontmatter menu information to generate the navbar menu instead of hardcoding

Open SayakMukhopadhyay opened this issue 7 months ago • 7 comments
trafficstars

Right now, in the navbar, the menu list is generated from a hardcoded list. Docsy provides a better way in which the front matter of the section _index.md files contains a manu param which provides enough information to generate the main menu list dynamically.

We should rework navbar.html to adopt that style.

The main blocker is the section _index.md files having that information in the front matter as without that, that section won't show up as a main menu item. This seems to be no issue for the en site but we need to ensure that other localisations also have this. Alternatively , we need a workaround for those particular localisations.

Also see.

SayakMukhopadhyay avatar Mar 25 '25 11:03 SayakMukhopadhyay

/area web-development

You can see a preview of the new approach (as part of a wider change): https://github.com/kubernetes/website/pull/48363

sftim avatar Mar 26 '25 11:03 sftim

Localizations that don't have the front matter correct, as of 2025-03-26:

  • French (Français)
  • German (Deutsch)
  • Hindi (हिन्दी)
  • Indonesian (bahasa indonesia)
  • Japanese (日本語)
  • Korean (한국어)
  • Polish (Polski)
  • Russian (Русский)
  • Ukrainian (Українська)
  • Vietnamese (Tiếng Việt)

sftim avatar Mar 26 '25 11:03 sftim

FWIW, Hindi has an issue open for tracking this effort

divya-mohan0209 avatar Mar 27 '25 12:03 divya-mohan0209

/kind bug

/area localization English already does the right thing

sftim avatar Mar 27 '25 16:03 sftim

/priority backlog /triage accepted

sftim avatar Mar 27 '25 16:03 sftim

Ah, not, this is not the bug, this is the feature we can provide once the bug is gone (ie when localizations are up to date). /kind feature /remove-kind bug /remove-area localization

sftim avatar Mar 27 '25 16:03 sftim

/triage accepted /priority backlog

sftim avatar Mar 27 '25 16:03 sftim

PRs still needed for:

  • ~Polish (Polski)~
  • Russian (Русский)
  • Ukrainian (Українська)
  • Vietnamese (Tiếng Việt)

lmktfy avatar Aug 14 '25 18:08 lmktfy