Giter Site home page Giter Site logo

Comments (10)

kepiej avatar kepiej commented on September 7, 2024 3

Thanks for the reply. I was able to get it working! The modification turned out to be quite simple. I now have submenus (but not submenus in submenus). They are specified using the parent field.
I attach my modification for anyone interested in the future: navbar.html

from hugo-blox-builder.

gcushen avatar gcushen commented on September 7, 2024

Academic doesn't support sub-menus. The general philosophy with the theme is to keep the interface simple, so this feature probably won't be added anytime soon.

You can customize the navigation bar for your purpose by copying themes/academic/layouts/partials/navbar.html to layouts/partials/navbar.html (relative to the root of your site). Your version of the navigation file will then override Academic's file.

from hugo-blox-builder.

gcushen avatar gcushen commented on September 7, 2024

Thanks for sharing your modification @kepiej . I just tested it out - the required code changes for the feature are more minimal than I expected and it doesn't break compatibility with the existing example site menu or the active link highlighter (Bootstrap scroll spy). Thus, I've had a change of mind and will integrate it shortly 😃

from hugo-blox-builder.

kepiej avatar kepiej commented on September 7, 2024

Great to hear! Happy to help and thanks for incorporating this! :)

from hugo-blox-builder.

svcuong avatar svcuong commented on September 7, 2024

Thanks for the reply. I was able to get it working! The modification turned out to be quite simple. I now have submenus (but not submenus in submenus). They are specified using the parent field.
I attach my modification for anyone interested in the future: navbar.html

@kepiej Please tell me after you've done navbar.html how did you make submenu in menus.toml?

from hugo-blox-builder.

rodrigoalcarazdelaosa avatar rodrigoalcarazdelaosa commented on September 7, 2024

Thanks for the reply. I was able to get it working! The modification turned out to be quite simple. I now have submenus (but not submenus in submenus). They are specified using the parent field.

I attach my modification for anyone interested in the future: navbar.html

@kepiej Please tell me after you've done navbar.html how did you make submenu in menus.toml?

Have a look at my repo: https://github.com/rodrigoalcarazdelaosa/rodrigoalcarazdelaosa.me where I use submenus

from hugo-blox-builder.

svcuong avatar svcuong commented on September 7, 2024

Thanks for the reply. I was able to get it working! The modification turned out to be quite simple. I now have submenus (but not submenus in submenus). They are specified using the parent field.

I attach my modification for anyone interested in the future: navbar.html

@kepiej Please tell me after you've done navbar.html how did you make submenu in menus.toml?

Have a look at my repo: https://github.com/rodrigoalcarazdelaosa/rodrigoalcarazdelaosa.me where I use submenus

@rodrigoalcarazdelaosa I saw it, thank you very much. But I didn't find navbar.html file in your layouts/partials/?

from hugo-blox-builder.

rodrigoalcarazdelaosa avatar rodrigoalcarazdelaosa commented on September 7, 2024

Thanks for the reply. I was able to get it working! The modification turned out to be quite simple. I now have submenus (but not submenus in submenus). They are specified using the parent field.

I attach my modification for anyone interested in the future: navbar.html

@kepiej Please tell me after you've done navbar.html how did you make submenu in menus.toml?

Have a look at my repo: https://github.com/rodrigoalcarazdelaosa/rodrigoalcarazdelaosa.me where I use submenus

@rodrigoalcarazdelaosa I saw it, thank you very much. But I didn't find navbar.html file in your layouts/partials/?

That feature was added years ago 😉. No need to add any custom partial

from hugo-blox-builder.

svcuong avatar svcuong commented on September 7, 2024

@rodrigoalcarazdelaosa I understand, thank you again 👍

from hugo-blox-builder.

7yl4r avatar 7yl4r commented on September 7, 2024

Even after reading this issue I didn't realize this was a working feature without custom partials. I was really happy to discover it is baked in!

I think it might be good to add a "how to edit the menu" docs page to the wowchemy docs or possibly modify the example academic template to include a simple submenu so the functionality is demonstrated.

from hugo-blox-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.