-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Support local search #776
Comments
Do you mean Algoria Search locally ? |
In my company we are looking for a similar solution using Lunrjs, where you can simply index your article locally. At the moment it looks pretty impossible to workaround reactjs and extend the navigation bar to allow the search field to appear without an algolia setup. |
@ntlex Things will change in Docusaurus v2 though 😊. |
@endiliey when is Docusaurus v2 coming ? |
@ntlex Hi. We are in the planning stages now. |
We have been evaluating a few tools to generate an internal help system in our company. The help system will be hosted behind the firewall and will not be exposed to public. To use the search feature, we need to have Algolia enabled, which wants the site to be public. Is there a way we can use the Search feature without Algolia? I really like Docusaurus and want to go ahead with it. However, the Search limitation is pulling us back. Will there be an immediate solution to this? |
Hi @altafakhai - I think we just responded to your tweet as well. We do not have a simple mechanism to support search behind a firewall at this point. We are looking at options for v2. There is probably a way to embed a search feature on your custom pages, but that is not optimal, of course. I believe that Algolia has an offline feature, but I have never used it and I don't think it would easily integrate in the current version of Docusaurus. cc: @s-pace |
You can use DocSearch on your internal network if you run it on your own. You will need to create your own configuration and then run it. We do not feature login so far but we are PR welcome. It is based on top of scrapy You can inspire the configuration from the Docusarus's one. Happy to help if you need anything else. |
@s-pace I have a question. If we run the scraper on our own, it will still push the the crawled results to the Algolia index (which is not our own network), and it's not "offline" search. Its just not requiring the website to be publicly accessible (as in to be crawled). Is this correct ? |
@endiliey Indeed. You can still use algolia offline but regarding the use-case, it is what we will recommend. |
Thank everyone provide so much suggests. Now i express my solution:
Information for your reference. |
Thanks for the help, @JoelMarcey @s-pace I will try to work with DocSearch and see if we get the desired results. Will keep you all posted with the progress. Eagerly waiting for v2. 😃 |
@sbansal3096 is planning to work on this either for v1 or v2. @endiliey @yangshun - are we planning on offering a local search implementation for v2. Or just a pluggable infrastructure for search? |
Just pluggable search box. I think he can try it on v1, the main implementation part is on building the docs index. |
@endiliey Do you mean he should only index |
Any update on this? |
Any update? Currently looking at static site generators for documentation. Like most things about Docusaurus except for the search. This is a nice project :) |
I have the same issue here on a Internal project and solved it with a server side search using @weixsong/elasticlunr.js. I would like to send a PR with this solution at some time. But Unfortunately I do not have time to do it right now. For now it is available in @the-darc/Docusaurus. |
Just implemented your fix. Looks good!! Cheers. |
+1 Local search would be an amazing addition. My use case is that I'd like to use Docusaurus for documentation hosted on an intranet and I can't pass any information to a third-party. |
@danforbes I can help you. Let's talk about your migration on your repo (can you open an issue or PR and ping me?) or on Discord instead. |
Thank you, @slorber! Are you able to add comments to this commit in GitHub? |
@slorber I've also created a draft PR polkadot-developers/substrate-developer-hub.github.io#563 |
I am looking for local search support for Hindi language. Any suggestions or a sulution? |
@dhitimedin You can make use of this MihaiValentin/lunr-languages#6 |
@ lelouch77 When I try to do that I get series of warnings. While running "npm run swizzle docusaurus-lunr-search SearchBar", I get exception. Trace pasted below: npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) Component "SearchBar" doesn't exists. "SearchBar" is swizzled instead of "SearchBar". |
@dhitimedin Thats happens on version of dosucarus ... Try running |
These swizzle error messages are tracked in #3408 |
Hi everyone, I just created https://github.com/easyops-cn/docusaurus-search-local, which is originally forked from cmfcmf/docusaurus-search-local, but later fully rewritten to reach our goal: up to date, maintainable, robustness, pretty look, and mostly language of Chinese supported. We have already using it in our production (but not public, that's why we need local search, : ).). |
Great! I will try right away. Does it support Hindi as a language? |
UI does not work properly on mobile. |
@dhitimedin Hope it will help you. It currently supports all lunr-languages + Chinese, but Hindi is not in it yet. I actually have not tested it with mobile devices. But it can be fixed easily by apply css media queries. I'll fix it later. |
Great! Would be helpful. My users use my site mostly from mobile. Do keep me posted on the steps required to rectify. |
Getting the following error while installing it: node-pre-gyp WARN Using needle for node-pre-gyp https download No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! npm ERR! A complete log of this run can be found in: |
@dhitimedin I think this is not the right place to trouble shooting this error. Could you please fire an issue at easyops-cn/docusaurus-search-local? |
@dhitimedin I just moved nodejieba from dependencies to peerDependencies (which is only required for language of zh), and a new version has published (v0.7.0), you can try it. It means that you will not get nodejieba installed by default, and the install error above would be no longer an issue. For further questions, please fire issues at easyops-cn/docusaurus-search-local, thank you. |
Any update on this issue? |
Nope! I am working on something else these days.
…On Thu, Aug 5, 2021 at 12:45 PM Sagar Patil ***@***.***> wrote:
Any update on this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#776 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQKMOYASGFHRIBMRJZITB53T3I3CVANCNFSM4FFF3KJA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I have a working example of a local search here which uses flexsearch. It's similar to lunrjs |
My local storage works for english. You can check out the site here. https://dhitimedin.github.io/docusaurus3/en/welcome |
Except that it does not work for Hindi |
Closing because there are ample community plugins and there seems to be little interest to bring this into the main repo. If you find any problem working with packages like @easyops-cn/docusaurus-search-local or @cmfcmf/docusaurus-search-local, please report to their repos. |
Is this a bug report?
NO
Have you read the [Contributing Guidelines on issues]
YES
Environment
None
Steps to Reproduce
None
Expected Behavior
None
Actual Behavior
None
Reproducible Demo
None
Request new feature
I have a website in my intranet, it generated use gitbook. Now i perfer to use the excellent website generator, and deprecated gitbook. But the tool miss local search capability while migrate process. So we have possible to provide local search(like hexo next theme)?
The text was updated successfully, but these errors were encountered: