Skip to content

Switch to PageFind for search - #361

Draft
ysims wants to merge 1 commit into
mainfrom
sims/search-update
Draft

ysims wants to merge 1 commit into
mainfrom
sims/search-update

Conversation

@ysims

@ysims ysims commented Aug 1, 2026

Copy link
Copy Markdown
Member

@netlify

netlify Bot commented Aug 1, 2026

Copy link
Copy Markdown

Deploy Preview for celebrated-malasada-385661 ready!

Name Link
🔨 Latest commit 0ddfd9d
🔍 Latest deploy log https://app.netlify.com/projects/celebrated-malasada-385661/deploys/6a6d9da3b8a87400085d6af9
😎 Deploy Preview https://deploy-preview-361--celebrated-malasada-385661.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 1, 2026

Copy link
Copy Markdown

Deploy Preview for nubook ready!

Name Link
🔨 Latest commit 0ddfd9d
🔍 Latest deploy log https://app.netlify.com/projects/nubook/deploys/6a6d9da3d7a60c00080f49e8
😎 Deploy Preview https://deploy-preview-361--nubook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@ysims

ysims commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

@JosephusPaye thoughts on using PageFind? I figured this might be better than Algolia as it's less effort to maintain with people changing. I think the search has been broken for a long time, at least a year if not longer. From what I understand, there's an account linked to the Algolia key and that's where it needs to be fixed? imo NUbot's account burden is pretty large atm and it might be better to limit it.

@JosephusPaye

Copy link
Copy Markdown
Member

Yeah I think it's a great idea to have something self-hosted if possible, to remove the third-party service dependency. Not familiar with PageFind itself but the architecture makes sense - build a static index each time we build the site and use that for the search.

How are you finding the quality of the results when searching?

@ysims

ysims commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

@JosephusPaye overall it seems fine, most relevant comes up at the top and it does partial word matches similar to what we have now. Does the job imo. The styling isn't as nice, but I suspect it can be improved.
There's some other styling that needs fixing up on this PR as well, like the search bar size, and I'll need to check the code.

@JosephusPaye

Copy link
Copy Markdown
Member

Nice, I just checked and the results appear good enough. I don't like that it doesn't show the NUbook chapter title (maybe there's a way to include this when building the index?) or link results to specific sections on the page.

I noticed the styling issues as well. Here's a list if it helps:

  • search bar size
  • search bar background (should have a background blur on the semi-transparent background)
  • search bar colors for the placeholder, icon and shortcut are not right in light mode. Hover colors also different. Can be seen by comparing the Algolia version with this PR side by side.
  • search bar placeholder wraps on mobile when the screen width is small, instead of staying inline and truncating with ...

Other minor styling improvements:

  • Highlight result substring matches with the NUbots orange
  • Use the NUbots orange for search box focus outline and the result focus outlines when navigating with arrow keys

I had an minor issue scrolling the result list on mobile (iPad) as it kept trying to scroll the background page instead of the result list. Can consistently reproduce there but not on Firefox on Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants