website icon indicating copy to clipboard operation
website copied to clipboard

website: Enhanced searching capability in the docs website with Pagefind

Open SanthoshToorpu opened this issue 8 months ago • 3 comments

Checklist:

  • [x] You have signed off your commits
  • [x] Ensure you follow best practices from our guide. Contributing.
  • [x] You have included screenshots when changing the website style or adding a new page.

Description of your changes:

refer : https://kubeflowdemosearch.netlify.app/ for Live demo This PR replaces the Google Custom Search with Pagefind for site search functionality. Pagefind is a static site search tool that works entirely in the browser, creating a more privacy-friendly and customizable search experience. The implementation:

  1. Creates a dedicated search page that uses Pagefind
  2. Adds necessary data attributes to content for proper indexing
  3. Updates search input to use relative paths to fix search page redirection
  4. Updates build process to generate search indexes during deployment
  5. Updates documentation with local development instructions for search

How page find works

  1. After we run hugo server, the pagefind is ran through an npx command allowing it to generate indexes.
  2. These indexes allow it to build a search functionality.
  3. This is then added to the website directly.

Previous search used a google custom search which wasn't that User friendly and accurate.

Issue

Closes: #4029

https://github.com/user-attachments/assets/96f348bc-f0c0-4ac4-83fb-964379541566

Labels

/area website


SanthoshToorpu avatar Mar 29 '25 10:03 SanthoshToorpu

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign terrytangyuan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

google-oss-prow[bot] avatar Mar 29 '25 10:03 google-oss-prow[bot]

Hi @SanthoshToorpu. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

google-oss-prow[bot] avatar Mar 29 '25 10:03 google-oss-prow[bot]

/hold

As we still need to discuss if the existing google search is sufficient, and if its not, what specific approach we will replace it with: https://github.com/kubeflow/website/issues/4029

thesuperzapper avatar Mar 30 '25 03:03 thesuperzapper

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 02 '25 00:07 github-actions[bot]

This pull request has been automatically closed because it has not had recent activity.You can reopen the PR if you want.

github-actions[bot] avatar Jul 23 '25 00:07 github-actions[bot]