ropensci-review-tools / babelquarto

Renders a Multilingual Quarto Project (Book or Website)
https://docs.ropensci.org/babelquarto/
Other
30 stars 6 forks source link

Book with navbar doesn't show language menu #51

Open Nenuial opened 5 days ago

Nenuial commented 5 days ago

I'm trying to make a multilingual book using babelquarto (it's amazing by the way !!) and I would really like to have a navbar on my book website.

It looks like this is not working. The language switcher doesn't show. I don't know if this is a bug or not implemented or if I'm doing something wrong.

I have a repo with an example here : https://github.com/Nenuial/TestBook

And the book here: https://test.nenuial.org

maelle commented 4 days ago

Thank you for the reprex and bug report! Indeed it does not work yet. The current code targets the logo to then add the "language div" https://github.com/ropensci-review-tools/babelquarto/blob/1c55ba0486a24d0032ed651f24b6c8f55076dd61/R/render.R#L333 and the logo does not exist for books with a navbar. It'd be more robust to think of the language div as a sibling to the div of class "sidebar-menu-container" (that seems to exist for both book types) however I won't have time in the very near future. I'll look into it in two weeks or in August... unless you send a PR :wink:

Nenuial commented 4 days ago

Thanks for your answer! I had a look at the code and it doesn't look too hard. I'll see if I can make it work and if I manage I'll make a PR.