-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
PageFind for users in China #46768
PageFind for users in China #46768
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi @cjyabraham If I go to https://deploy-preview-46768--kubernetes-io-main-staging.netlify.app/zh-cn/docs/home/ and search for kubectl 命令行工具, I get pages in English. To be fair, I'm using a browser that prefers English but I was looking at the Chinese docs. This may well surprise users. |
/hold |
It looks like this is due to a problem with how the site currently works: if you're viewing Chinese pages and then perform a search, you always get redirected to the English search results page instead of staying on the Chinese search results page. I think once we fix this then the results will be pulled correctly from the Chinese content rather than the English. You can see how that should look on the Chinese search results page here: https://deploy-preview-46768--kubernetes-io-main-staging.netlify.app/zh-cn/search/?q=kubectl+%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7 |
Actually now that I think of it, it's a known issue with doscy which I have already submitted a fix for in this PR. Since that's not merged yet, we can reapply the fix locally within this site... |
Ok, I've fixed that issue so now the site should correctly keep the user on the search page of the same language they were on. This is going to be a problem, however, for languages that don't have search pages, like French, so perhaps we should quickly add content files for them? UPDATE: I've added the missing search.md content files. |
/cc @windsonsea @tengqm |
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
/hold cancel |
The PageFind functionality is only visible to users in China. However, you can check this out locally and try it by editing the |
/hold @kubernetes/steering-committee howdy steering! this change has come about out of the CNCF's need to replace Bing for users in China, and our zh-localization community, alongside other folks in SIG Docs, have reviewed this change to ensure it's doing what it describes. we want to check if this needs to be run by you before merging – thanks! |
LGTM on my side, I don't think it needs steering sign off 👍 |
#46768 (comment) Agree. |
Feel free to unhold, or wait for a simple majority of steering (routine business rules would apply if a vote were needed for something like this), but I pretty strongly think this does not need to wait for steering and is delegated to SIG Docs. (re: delegation, maybe reach out to SIG K8s Infra if we have new paid SaaS accounts to manage but AFAICT this is not the case here and still wouldn't involve steering) |
sick, thanks @mrbobbytables and @BenTheElder! |
LGTM label has been added. Git tree hash: 82c0ff4334fe8c9154b587542f3f9e454d0861fc
|
Thanks for this @cjyabraham & @sftim, and thanks to all the reviewers! /approve |
/lgtm |
/assign natalisucks |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natalisucks, nate-double-u The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First, this PR has PageFind search available for all users OUTSIDE of China. This is just temporary to facilitate testing and we will revert this before merging the PR. The goal is to show PageFind to all users IN China, as a replacement for Bing, which has been costing CNCF a lot of money recently.
Could someone help integrate this into the Makefile properly. I’m not sure where it should be applied and how to integrate it. You can see what I’ve done to get PageFind to run in the netlify.toml commands but that may not be the right place for them.
Searches with PageFind can be compared against the current site. If they are adequate, then we can get this deployed soon to remove Bing from the site. We should specifically test searches in Chinese but also test English and other languages.
We can enhance the PageFind search functionality in the future with filters, sorting, etc. If the PageFind results become better than those of Google Custom Search, we can have it serve all users, not just those in China.
I pulled ideas from #44655 when creating this PR but started from scratch as I couldn’t get that PR branch to run locally. I also kept the scope narrower and less ambitious, limiting PageFind search to just Chinese users while keeping Google Custom Search for everyone else. This was so that we could address the immediate need of getting off Bing as quickly as possible.
FYI this is the command I use to test this locally: