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

fix(v2): restore Algolia search #3828

Merged
merged 1 commit into from
Nov 27, 2020
Merged

fix(v2): restore Algolia search #3828

merged 1 commit into from
Nov 27, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Nov 27, 2020

Motivation

Fixes #3826

If i18n is not used, locale will be undefined then, so we shouldn't include it in Algolia's facet filters.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Nov 27, 2020
@lex111 lex111 requested a review from slorber as a code owner November 27, 2020 08:49
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 27, 2020
@netlify
Copy link

netlify bot commented Nov 27, 2020

Deploy preview for docusaurus-2 ready!

Built with commit 360b535

https://deploy-preview-3828--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 69
🟢 Accessibility 99
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-3828--docusaurus-2.netlify.app/classic/

@lex111
Copy link
Contributor Author

lex111 commented Nov 27, 2020

@slorber since this is a hot fix I am merging right now, but something seems to me like locale is always undefined because there is no locale in facet filters on French version site https://deploy-preview-3828--docusaurus-2.netlify.app/classic/fr/ although should be there?

@lex111 lex111 merged commit 0f13780 into master Nov 27, 2020
@lex111 lex111 deleted the lex111/fix-search branch November 27, 2020 09:06
@slorber
Copy link
Collaborator

slorber commented Nov 27, 2020

Thanks, fixed it better here: #3829

The currentLocale is not read from the correct place, so your solution will fix the site but it would still lead to a problem.

@slorber
Copy link
Collaborator

slorber commented Nov 27, 2020

ahhh tooo late :D

@github-actions
Copy link

Size Change: +19 B (0%)

Total Size: 156 kB

ℹ️ View Unchanged
Filename Size Change
website/build/blog/2017/12/14/introducing-docusaurus/index.html 20.7 kB +1 B
website/build/docs/introduction/index.html 180 B 0 B
website/build/index.html 5.87 kB 0 B
website/build/main.********.js 112 kB +18 B (0%)
website/build/styles.********.css 17.4 kB 0 B

compressed-size-action

@lex111
Copy link
Contributor Author

lex111 commented Nov 27, 2020

Oops sorry :)

@slorber
Copy link
Collaborator

slorber commented Nov 27, 2020

will update my PR with a proper fix

Note: there is always a current locale (en by default).

Previously we used to hardcode this locale

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search on v2.docusaurus.io returns no results
3 participants