Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Search Option #466

Closed
sheldonhull opened this issue Feb 21, 2018 · 19 comments
Closed

Offline Search Option #466

sheldonhull opened this issue Feb 21, 2018 · 19 comments
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: claimed Issue has been claimed by a contributor who plans to work on it.

Comments

@sheldonhull
Copy link

sheldonhull commented Feb 21, 2018

Is this a bug report?

no

Offline search functionality

Has anyone successfully implemented Lunr.js or another offline based search provider? I'm looking to create a offline static documentation site, and can't grant a web crawler the ability to index. I need to leverage something offline like Lunr, solr, or another option, but haven't done that before. Is this a possible enhancement, or anyone successfully done this and willing to share how to do it?

@JoelMarcey JoelMarcey added the feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. label Feb 26, 2018
@JoelMarcey
Copy link
Contributor

Hi @sheldonhull. I have not added an offline search provider. But I imagine you could follow https://lunrjs.com/guides/getting_started.html and do some stuff in siteConfig.js to add it. And then maybe mimic how we add Algolia to the header links bar for Lunr?

@sheldonhull
Copy link
Author

Thanks! I ended up sticking with Mkdocs as I had an easier time using what was already built in. Just was a better fit for what I already knew how to use. You guys have a great project though, thanks for the hard work!

@wulucxy
Copy link

wulucxy commented Mar 14, 2018

@sheldonhull do you have solved this problem? my website is only for company-internal network,so the recommend Algolia DocSearch is not suitable for me。

@njsokol
Copy link

njsokol commented Jun 28, 2018

This would be an awesome feature

@bram209
Copy link

bram209 commented Jun 29, 2018

I would love this feature as well

@danerich
Copy link

This would be a great addition!

@ghost
Copy link

ghost commented Aug 9, 2018

+1

@KerimG
Copy link

KerimG commented Aug 13, 2018

+1

Doubt we'll ever see this feature, though.

@JoelMarcey
Copy link
Contributor

@KerimG I wouldn't say never. It is on on our v2 roadmap.

@prakhar-goel
Copy link

+1 for offline search using lunrjs or similar. We are using Docusaurus for internal company documentation and therefore cannot use default Algolia search. Ability to search through markdown files would be a great add on to the current version.

@ishanmihir19
Copy link

+1

@ghost
Copy link

ghost commented Oct 8, 2018

I have implemented, search with Elastic lunar and node js for one of our internal sites. I will share the code tonight. That may be helping.

@JoelMarcey JoelMarcey added the status: claimed Issue has been claimed by a contributor who plans to work on it. label Oct 8, 2018
@JoelMarcey
Copy link
Contributor

Just as an FYI - @sbansal3096 is working on this as part of #776.

This is actually a duplicate issue.

Please follow #776 for updates.

@joetidee
Copy link

Algolia search system is a deal-breaker for us.

@lelouch77
Copy link

lelouch77 commented Jan 26, 2020

I created an offline search plugin that looks similar to algolia search using lunr.js Check it out ..
https://github.com/lelouch77/docusaurus-lunr-search
image

Live Demo is available at https://lelouch77.github.io/docusaurus-lunr-search-demo/

@kamdjouduplex
Copy link

@lelouch77 thank you very much for this plugin, I succeed integrating it on my docusaurus v2 project in a minute.
good job!

@joan38
Copy link

joan38 commented Jun 1, 2020

Not working for me, I get a:

Error: Cannot find module 'docusaurus-lunr-search'

@GustavoAngulo
Copy link

@joan38 Did you find a fix for the Cannot find module error? CC: @lelouch77

@lelouch77
Copy link

@joan38 @GustavoAngulo Seems there some issues including node module in plugin with new version of docusaurus, just change your docusaurus.config.js as follow.

const path = require('path');
module.exports = {
  // ...
    plugins: [path.resolve(__dirname, './node_modules/docusaurus-lunr-search/')],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: claimed Issue has been claimed by a contributor who plans to work on it.
Projects
None yet
Development

No branches or pull requests