EasyRPG / easyrpg.org

The EasyRPG project website
https://easyrpg.org
12 stars 7 forks source link

RFC: Add a search option #79

Open carstene1ns opened 2 years ago

carstene1ns commented 2 years ago

Will be useful later for the (static) blog and wiki.

Search is running on the client. Data is preprocessed by nanoc. This makes it fast and not resource hungry.

I have added the whole blog locally and the json data is still smaller than one screenshot... ;-)

carstene1ns commented 2 years ago

You can try it here: https://ci.easyrpg.org/job/website-pr/ws/output/search/index.html

The links are broken, since i do not add the (changed) base-url. This could be fixed later.

https://ci.easyrpg.org/job/website-pr/ws/output/search/index.html?q=player -> even permalinks work.

carstene1ns commented 2 years ago

Rebased on the netlify PR.

https://deploy-preview-79--easyrpg.netlify.app/search/?q=player

Ghabry commented 2 years ago

This works pretty well imo 👍 . Wouldn't have expected that searching can be possible on a static page.

Only thing missing is a way to reach the search.

A later PR could also add a preview feature to indicate where the search result was found with adjacent text for context

carstene1ns commented 2 years ago

Should be more visible now.

Ghabry commented 2 years ago

Was there anything missing here? I simply forgot about it. :sweat_smile:

Only change I would suggest is moving the search icon into the header after "Contact" because currently it is not possible to search while on the main page.