-
Hi, The search input is present on live server, but disappears when I run offline build.
but it doesn't solve the issue... I see the search is missing also on James Willett tutorial sample: How to solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hello @jablka, site_name: My Docs
theme:
name: material
plugins:
- search
- offline As for https://james-willett.github.io/mkdocs-material-youtube-tutorial/ not having search is because it doesn't include Further reading: https://www.mkdocs.org/user-guide/configuration/#plugins |
Beta Was this translation helpful? Give feedback.
-
Hi! I made a project like this, but unfortunately the search field disappears if the internet goes down. Am I right that the search should work even without internet access? |
Beta Was this translation helpful? Give feedback.
Ah I see. Yes, the problem is that the font cannot be loaded (since it's referenced from Google), and the
iframe-worker
shim from unpkg.com, which you'll see if you open the browser console. To solve it, just add the privacy plugin, which will allow full offline capability. This is also explained here:The logic of downloading and inlining external assets, and preparing the site for offline use is split among the offline and privacy plugin, since we would otherwise end up with duplicated functionality. We'll evaluate in the future how we can make this easier to configure.