bundler-site
bundler-site copied to clipboard
Replace middleman-search with lunr with Typesense DocSearch
What was the end-user problem that led to this PR?
As middleman-search (RubyGems, GitHub) has not been maintained for more than 5.5 years (for example https://github.com/manastech/middleman-search/pull/38), bundler-site maintainers/contributors cannot upgrade lunr to the latest without their additional efforts (or other community's efforts than maintainers/contributors of this repo).
Closes #691
What was your diagnosis of the problem?
UI can be replaced by https://github.com/algolia/docsearch or its forks. Backend (current /search/lunr-index.json
) can be replaced by Algolia DocSearch with automated crawling or Typesense cloud with manual crawling by us.
What is your fix for the problem, implemented in this PR?
- Removes middleman-search gem and relevant gems (mini_racer)
- Removes JS/CSS codes and Middleman configuration for middleman-search
- Removes (the load of) Popover CSS from Bootstrap 5 along with the above JS code removal.
- Also the load of
/application.min.js
is moved to outside of<head>
.
A crawler (which is expected to run once a day in production) is currently run by my local.
A cloud project on Typesense cloud called k0cw8zgj4i592lsqp-1.a1.typesense.net
is used.
Why did you choose this fix out of the possible options?
If Typesense offers us to some tiny instance at no cost and the permission to the UI, we might be able to use this change instead of Algolia's DocSearch.
Signed-off-by: Takuya Noguchi [email protected]
So nice to get rid of the v8 too!
Algolia alternative seems easier for now but I have to say I find this UI very nice looking.
This looks fine performance wise, and the UI seems nice too. But the presence of a logo is a blocker and the majority of maintainers seem to prefer to take over middleman-search maintenance?
This looks fine performance wise, and the UI seems nice too. But the presence of a logo is a blocker and the majority of maintainers seem to prefer to take over middleman-search maintenance?
indeed, let's focus on that one
Features, look and feel are now all set. A small tweak in UI was submitted as a PR to the upstream, which is however NOT blocked to get this merged.
Any feedback is welcome again.
@tnir You plan is unclear to me, since we don't have permission to go ahead without a logo. Everybody agrees to keep middleman-search for now.
Just my previous comment was delayed. Just send back to draft at the moment while not sure this can be usable in the future.
Ah, I see, makes sense now if comments are read in the right order :)
By the way, another problem underlies in assets/javascripts/search.js
. The hard way.
I understand, but for now it seems our best option is to maintain these ~200 lines of JavaScript and this gem for searching...