Skip to content

Allow searching through the descriptions of reference pages, and not just through their titles #493

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

Open
bojidar-bg opened this issue Aug 22, 2024 · 4 comments
Assignees

Comments

@bojidar-bg
Copy link

Most appropriate sections of the p5.js website?

Reference

What is your operating system?

Linux

Web browser and version

127.0.2

Actual Behavior

When searching for e.g. "smallest", search currently returns no results -- despite min() being described as "Returns the smallest value in a sequence of numbers".
Meanwhile searching for e.g. "radial", correctly returns the color gradient tutorial, described as "Use radial gradients, linear gradients, and blend modes to create lens flare stickers & colorful filters on top of a webcam selfie.'

Expected Behavior

Search finds reference results based on the text contained within the reference entry, and not just based on the name of the function - after all, if someone wanted to match the reference entry names only, they could use the search box on the reference page itself.

Steps to reproduce

Would you like to work on the issue?

Someone else may claim the issue.

@bojidar-bg
Copy link
Author

bojidar-bg commented Sep 8, 2024

As mentioned on the linked issue: if search index size (both in storage and during download) is a problem, there are some tools that might help pack it more optimally; see e.g. this page on Hugo's website describing search.

(In particular, pagefind looks promising)

@limzykenneth limzykenneth added Feature Request and removed Bug Something isn't working labels Jan 31, 2025
@akkarn1689
Copy link
Contributor

Hi @bojidar-bg & @limzykenneth,

I would like to contribute to this issue. Please assign this to me.

Thanks!

@davepagurek
Copy link
Collaborator

Thanks @akkarn1689! I'll assign this to you, but before going ahead with a full solution, it might make sense to investigate some of the potential paths forward @bojidar-bg mentioned, experimenting to see what kinds of code size tradeoffs we see. (The reason why it only searches titles right now is a compromise between functionality and load time: our deployment is on GitHub Pages, with no backend, meaning that all the search happens browser-side, and so we have to load all the searchable content upfront.) Let us know in the comments what direction you plan on going in, and what your findings are 🙂

@akkarn1689
Copy link
Contributor

Hi @davepagurek,

I am looking into the potential paths suggested by @bojidar-bg. Will share my findings ASAP.

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

No branches or pull requests

4 participants