HEIGE-PCloud / DoIt

A clean, elegant and advanced blog theme for Hugo.
https://hugodoit.pages.dev
MIT License
790 stars 195 forks source link

[FEATURE] submenus #1158

Closed morgandavidson closed 7 months ago

morgandavidson commented 9 months ago

Describe the feature you want 描述你的功能需求

Thank you so much for this wonderful theme, which has so many great shortcodes, especially echarts support. As I need to have data visualizations on my website I would like to switch to your theme. My only concern is that the structure of my website is based on submenus and It seems that your theme doesn't support them.

Example of submenu config from hugo.toml:

    [languages.fr]
      languageCode = "fr"
      languageName = 'Français'
      weight = 2
      [languages.fr.params]
        description = "Visualisation de données à caractère politique"
    #mydomain = "tekki-tipps.de/en/ 🇬🇧"
        # Home subtitle of the index page:
        homeTitle = "Bienvenu sur Poligraph"   # Home page title
        homeSubtitle = "Un bon croquis vaut mieux qu'un long discours - Napoléon Bonaparte"

    [[languages.fr.menu.main]]
      identifier = "about"    
      name = "À propos"
      weight = 1
    [[languages.fr.menu.main]]
      identifier = "approach"     
      parent = "about"
      name = "Notre approche"
      weight = 1
      pageref = "/about/approach.fr"    
    [[languages.fr.menu.main]]
      identifier = "team"     
      parent = "about"
      name = "Notre équipe"
      weight = 1
      pageref = "/about/team.fr"

Useful reference 有价值的参考

Examples of hugo themes providing submenu feature:

HEIGE-PCloud commented 8 months ago

Note for implementation: I think an existing web component library like https://github.com/github/details-menu-element should be the right way to do this.

HEIGE-PCloud commented 7 months ago

Closing this for now, this will be tracked in https://github.com/HEIGE-PCloud/DoIt/issues/451