processing / p5.js-website

New p5.js website!
http://p5js.org
MIT License
17 stars 83 forks source link

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

Open bojidar-bg opened 2 months ago

bojidar-bg commented 2 months ago

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 commented 1 month ago

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)