@@ -6,10 +6,10 @@ search:
6
6
7
7
# Setting up site search
8
8
9
- Material for MkDocs provides an excellent, client-side search implementation,
9
+ Material for MkDocs provides an excellent client-side search implementation,
10
10
omitting the need for the integration of third-party services, which might
11
- be tricky to integrate to be compliant with data privacy regulations. Moreover,
12
- with some effort, search can be made available [ offline ] .
11
+ not be compliant with privacy regulations. Moreover, search even works
12
+ [ offline ] , allowing users to download your documentation .
13
13
14
14
[ offline ] : #offline-search
15
15
@@ -307,26 +307,30 @@ clipboard.
307
307
308
308
# ## Offline search
309
309
310
- [:octicons-tag-24 : 5.0.0][offline search support] ·
311
- [:octicons-cpu-24 : Plugin][localsearch]
310
+ [:octicons-heart-fill-24:{ .mdx-heart } Insiders][Insiders]{ .mdx-insiders } ·
311
+ [:octicons-tag-24 : insiders-4.7.0][Insiders] ·
312
+ :octicons-beaker-24 : Experimental
312
313
313
- If you distribute your documentation as `*.html` files, the built-in search
314
- will not work out-of-the-box due to the restrictions modern browsers impose for
315
- security reasons. This can be mitigated with the [localsearch] plugin in
316
- combination with @squidfunk's [iframe-worker] polyfill.
314
+ Insiders makes sure that the built-in search also works when you distribute your
315
+ documentation as `*.html` files for download. Simply add the following lines to
316
+ `mkdocs.yml` :
317
317
318
- For setup instructions, refer to the [localsearch documentation].
318
+ ` ` ` yaml
319
+ use_directory_urls: false
320
+ ` ` `
319
321
320
- [offline search support] : https://github.com/squidfunk/mkdocs-material/releases/tag/5.0.0
321
- [localsearch] : https://github.com/wilhelmer/mkdocs-localsearch/
322
- [iframe-worker] : https://github.com/squidfunk/iframe-worker
323
- [localsearch documentation] : https://github.com/wilhelmer/mkdocs-localsearch#installation-material-v5
322
+ This ensures that `index.html` is appended to all internal URLs, which is
323
+ necessary for allowing users to view your documentation locally and without
324
+ Internet connection. No further setup is necessary – your documentation will
325
+ work online and offline without any further ado.[^1]
324
326
325
- !!! tip
327
+ [^1] :
328
+ Offline search was previously implemented through the third-party
329
+ [localsearch] plugin, which is still possible if you don't want to use
330
+ [Insiders]. Note, however, that setup might be challenging if you're not
331
+ experienced with MkDocs.
326
332
327
- When distributing documentation as HTML files to be opened from the file
328
- system, you will also want to set `use_directory_urls : false` in
329
- ` mkdocs.yml` to make page links function correctly.
333
+ [localsearch] : https://github.com/wilhelmer/mkdocs-localsearch/
330
334
331
335
# # Usage
332
336
0 commit comments