-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
docs: add additional search options, typesense and local search #5489
docs: add additional search options, typesense and local search #5489
Conversation
Hi @jasonbosco! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
I've signed the CLA |
8e2116f
to
7138559
Compare
✔️ [V2] 🔨 Explore the source changes: 04c14e1 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/614b48e06e5b34000822c462 😎 Browse the preview: https://deploy-preview-5489--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5489--docusaurus-2.netlify.app/ |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
LGTM 👍
I'd just like to have a mention that we only support Algolia officially so that users don't open us bug reports that we can't solve.
A live Typesense Docusaurus deployment is not required, just a nice to have
website/docs/search.md
Outdated
- [typesense-docsearch-scraper](https://github.com/typesense/typesense-docsearch-scraper) - which scrapes your website and indexes the data in your Typesense cluster. | ||
- [docusaurus-theme-search-typesense](https://github.com/typesense/docusaurus-theme-search-typesense) - a search bar UI component to add to your website. | ||
|
||
### Instructions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this extra section is a bit useless/too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured it would be helpful to call out that there are two components to this, the scraper and the plugin, so users know that it's not just a plugin.
website/docs/search.md
Outdated
- [Algolia DocSearch](#using-algolia-docsearch) | ||
- [Typesense DocSearch](#using-typesense-docsearch) | ||
- [Local Search](#using-local-search) | ||
- [Your own `SearchBar` component](#using-your-own-search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding a note that says only the Algolia plugin is official, and the other solutions are maintained/supported by the community, otherwise, we may have users opening Typesense issues in this repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thank you for adding this!
website/docs/search.md
Outdated
@@ -182,6 +187,30 @@ If you prefer to edit the Algolia search React component, swizzle the `SearchBar | |||
npm run swizzle @docusaurus/theme-search-algolia SearchBar | |||
``` | |||
|
|||
## Using Typesense DocSearch {#using-typesense-docsearch} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful for users to provide a link to a live Docusaurus site using Typesense in this section, it would help figure out if the end result is good enough before investing any time?
(I'd suggest forking Docusaurus site, replacing the algolia plugin by typesense, and deploying to Netlify + provide live URL and source)
My intuition is that the UI/UX would be similar to Algolia, but can't be sure. For users, it's harder to assess Typesense than Algolia
As this PR is a bit old (was on holiday 2 weeks 😅 ) I'll fix and merge it now, but feel free to provide a live deployment in the future :) |
Also added some useful things about Algolia that were not very well documented |
Thanks for merging this @slorber! Great idea about setting up Typesense DocSearch on a Docusaurus site and including that as an example. I'll create a separate for PR it. |
Motivation
This PR is a follow-up to #5446 (comment).
The motivation behind this PR is to provide multiple options for a search bar for users, in addition to Algolia. To this end, I've updated the first section of the docs to list out all the options, I've then added a section about Typesense (linking to Typesense's documentation) and another section about local search plugins.
Have you read the Contributing Guidelines on pull requests?
Yes.
Test Plan
I've already run this locally to make sure formatting is good, and that all links I added work fine.
Related PRs
None.