I created a simple index.html page in Hugo site that contains a bootstrap navbar and the code from the example site for the official Hugo Bootstrap Module. I followed all the instructions provided at github.com/gohugoio/hugo-mod-bootstrap-scss
My code can be found here : github.com/rodneymaiato/moduleSite.git
The only way I get it to work is by adding the CDN link for the JS in a script tag, but the point is to learn how to use modules correctly.
Any help would be very appreciated.
You should import the component JS on
assets/js/index.js, in your use case, you’ll need to import the dropdown component.
You can find all available components on the link above.
Thanks for the quick reply! I had imported the component yesterday and no luck. I read your instructions and tried it again today - still not working.
I updated my repository with your instructions for anyone to see my code.
It sounds like this should be fairly easy. I do see there is a function written after the popper and toast imports for the imports to function correctly. Is there anything else that you can think of to make the dropdown import work?
You’ve to import the collapse as well, since you’re using collapse component on navbar, so that you can expand the menus on small screen, if you found some component not working, it probably causes by the missing the component JS.
That worked beautifully after restarting my server. Thank you so much for your patience!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.