ropensci-books / drake

The user manual for the drake R package
https://books.ropensci.org/drake/
GNU General Public License v3.0
55 stars 26 forks source link

Search bar broken #165

Closed malcolmbarrett closed 4 years ago

malcolmbarrett commented 4 years ago

Hi -- thanks for this great resource!

On Chrome and Safari, the search bar does not work (it doesn't appear when clicking). I have seen this on two separate Macs. I haven't been able to replicate this in other bookdown sites, so I think it may be something about the configuration for this site, and I wanted to bring it to your attention. Thanks!

wlandau commented 4 years ago

Maybe it's an issue with the latest bookdown? The search bar does not work for me either, but neither does a clone of https://github.com/yihui/bookdown-minimal when I render locally and view in a browser. Would you install bookdown 0.20, render https://github.com/yihui/bookdown-minimal with bookdown::render_book('index.Rmd', 'all'), open _book/index.html in a browser, and try the search bar there?

wlandau commented 4 years ago

When I build and serve the manual locally with

source("faq.R")
source("build.R")
servr::httw(".", site.dir = "_book")

then the search bar works. On the gh-pages branch I see the usual search bar JS and CSS code makes it into https://github.com/ropensci-books/drake/tree/gh-pages/libs/gitbook-2.6.7. For the website itself, the only messages in the browser's developer console are about Google Analytics cookies.

In other words, I do not know how to debug this, and I will need the help of a PR or someone who is more experienced in web development.

malcolmbarrett commented 4 years ago

I'm having basically the same results. I see that other rOpenSci books are ok (e.g. https://books.ropensci.org/fulltext), so it's not simply an issue of using GH pages...

wlandau commented 4 years ago

Now fixed. Details at https://github.com/rstudio/bookdown-demo/issues/12#issuecomment-657329216.

malcolmbarrett commented 4 years ago

Wow, this is some serious detective work. Nice job and thanks for fixing!