I am using research-group
theme (bootstrap) and I need to add a button
to the navbar.
My idea is to use a customized navbar.html
. In some tailwind based themes, I have done this by adding my customized navbar to /layouts/partials/components/headers
and then referring to it in the params.yaml
.
I tried to use this approach, but I don’t know how to refer to this new header (I add it to params.yaml
but it is not read), therefore, I couldn’t get this approach working for research-group theme.
So my question is, how to add a customized html to a bootstrap hugo theme. Thank you in advance.
I googled your theme and if it is this one then you have to go there, click the chat link, join the chat and ask the theme developer how to do that. It’s not a Hugo feature to “add customized” thingies to a theme, it’s each individual themes own feature. If the theme doesn’t have that feature you most probably override theme files with your own files that include that feature. I didn’t see anything pointing to that on the repo-page I found though.
I found the solution in this post. The html file must be placed in layouts/partials/components/headers
and then in params.yalm
add:
header:
navbar:
block: my-navbar
enable: true
My mistake was that I had used blox: my-navbar
.
P.s. to have the html file (and then customize it) I just got it from the github of the theme.