apache / cordova-docs

Apache Cordova Documentation
https://cordova.apache.org/
Apache License 2.0
350 stars 554 forks source link

feat: Add search functionality #1345

Open jcesarmobile opened 3 months ago

jcesarmobile commented 3 months ago

Feature Request

Motivation Behind Feature

it's hard to find things in the site without search functionality

Feature Description

a search box where you enter a text and returns the pages where the text you searched appear

Alternatives or Workarounds

we had algolia search but was not working and was removed, so we might try to figure out how to add it back or add an alternative thing

breautek commented 3 months ago

For context, Algolia was removed because they seemed to have decomissioned their v1 API which we were using.

They do still have a free variant so we could probably re-introduce algolia using their current API version, but personally I'd be inclined to try a completely local/client-side solution.

https://jekyllcodex.org/without-plugin/search-lunr/

It builds an index during the jekyll build, so we won't be dependent on any third-party service, and generates a custom search function. Though I can't vouch how well this particular library works.