Offline search
under review
Manuel Spigolon
Lyra is an offline search engine: https://lyrasearch.io/
I'm testing the Lyra Seach plugin: https://github.com/LyraSearch/plugin-docusaurus
It is getting better day by day and it works - it requires some additional highlight feature but more users will use it and more devs will improve it
O
Oluwatobi Sofela
I initially preferred @easyops-cn. However, after installing it, I couldn't get it to return any search results in production, so I switched to @cmfcmf—which works fine.
Some cons of @cmfcmf are:
* Its ARIA input fields do not have accessible names. (Lighthouse report)
* Its background and foreground colors do not have a sufficient contrast ratio. (Lighthouse report)
* There's no option to see all the search results.
* It has no search page.
Having tried @easyops-cn's live demo (https://easyops-cn.github.io/docusaurus-search-example/), it seems better than @cmfcmf—only if I can get it to work :-(
Lena Pan
Oluwatobi Sofela: finally have this search box installed after several failures, it is because of my improper configuration, and run the commands, the lines below should be added in const config ={, before title
plugins: [
[require.resolve("@easyops-cn/docusaurus-search-local"),
{ hashed: true }
],
],
S
Sebastian
I've now tried both and prefer @easyops-cn because of the better default design and its many options for custom paths etc..
Joshua Chen
This is the top requested feature (far more than the second place)! I don't think we would make and maintain another offline-search plugin ourselves (because we won't use it on our website), but we would officially endorse and support one of the community plugins. The tricky part is, there are two plugins (
@cmfcmf
and @easyops-cn
for those familiar with them) that are of comparable popularity and features, so it's a hard decision about which one to adopt, both for the users and for ourselves. We recommend anyone who voted in this thread to try out at least one of them.Joshua Chen
Merged in a post:
Built-in/native search
M
Michael Ferullo
Algolia has made it increasingly more difficult for many to be approved for their services. It is great that there are plugins for search, but I personally feel that any documentation platform, especially those that are static site generators, be capable of searching. I host my website with Cloudflare Pages, and I am sure that many others host this on an infrastructureless platform which makes using something like an Algolia crawler an additional expense and headache. Most other major search platforms (VuePress, MkDocs to name a few) are capable of including a built-in search and I don't see any reason why Docusaurus can't do the same. This is the only major limitation I currently have with Docusaurus and unfortunately makes it imperfect for my needs.
Lena Pan
In great need of this, tried to add a search bar since last Friday and have not succeeded yet, 😂
Ben Perlmutter
i agree it'd be great to have built in search.
in the meantime, this plugin works pretty well - https://github.com/cmfcmf/docusaurus-search-local
Sébastien Lorber
Merged in a post:
Built in search without Algolia
Radu Martin
Sébastien Lorber
under review
Mike Renwick
I found @easyops-cn/docusaurus-search-local which works seamlessly, looks very similar to Algolia search, styles easily and also adds the search page. Highly recommended.
The other lunr variants out there are also pretty good, but lack the standalone search page. Minor niggles- don't index things in mdx particularly well, and harder to style interactively as they don't show a useful mock when running in npm start.
Load More
→