wilhelmer / mkdocs-localsearch

A MkDocs plugin to make the native "search" plugin work locally (file:// protocol)
MIT License
32 stars 8 forks source link

localsearch seems broken with mkdocs-material 7.0.0 update #12

Closed renoger closed 3 years ago

renoger commented 3 years ago

Hi @wilhelmer,

Thanks for your continued support on the plugin!

I´ve updated to localsearch 0.8.0 and followed your guidance (added {{ super() }} in the custom main.html). Since I´ve updated to material 7.0.0 (and 7.0.1) the localsearch is not working for me anymore. The search-index is created but the search box doesn´t open when active: image

It works fine with material 6.2.8 and the identical configuration though: image

I wonder if it breaks due to the changes in base.html or general architectural oberhaul of material v7. Any idea what I´m missing or how I can debug?

Thanks René

wilhelmer commented 3 years ago

Did you customize your header? If so, you must update your header.html to Material's latest version (see https://github.com/squidfunk/mkdocs-material/blob/master/material/partials/header.html).

renoger commented 3 years ago

I previously used a custom header, but not anymore. To make sure I don´t overwrite anything I removed the whole partials folder and left the main.html as my only custom file. But it doesn´t affect the issue.

wilhelmer commented 3 years ago

I tested it with the beta, not with the final version. I'll look into it later, thanks for reporting.

renoger commented 3 years ago

Good point, I was just checking 7.0.0b1 and 7.0.0b2 which worked fine. So please check if you see the same behaviour with the final version (which is 7.0.2 by now, also not working for me). Thanks!

wilhelmer commented 3 years ago

@squidfunk Did you change anything here between v7 beta and final? I can see __search is being fulfilled correctly, but search doesn't work, as described above.

Bildschirmfoto 2021-03-01 um 14 23 27
squidfunk commented 3 years ago

Should work. Could you file an issue with a reproducible example?

wilhelmer commented 3 years ago

Done, thanks for your help.

wilhelmer commented 3 years ago

Fixed in MkDocs Material 7.0.4.