Appsilon / rhino

Build high quality, enterprise-grade Shiny apps at speed
https://appsilon.github.io/rhino
293 stars 25 forks source link

Use `before_navbar` to fix the double search box #604

Closed kamilzyla closed 4 months ago

kamilzyla commented 4 months ago

Changes

Closes #601.

The pkgdown/build.R script used to replace the navbar.html template in order to add a documentation version switcher to the navbar. However, this solution broke down when the template was updated in {pkgdown}.

Fix: use template.includes.before_navbar to inject the version switcher instead of overwriting the navbar template. This solution has a chance of being more robust against future updates to the template.

Testing

I have tested this solution in a forked repo and it seems to work fine. See the bot/github-pages branch there.