18F / jekyll_pages_api_search

DEPRECATED - Jekyll search plugin based on lunr.js and jekyll_pages_api
https://rubygems.org/gems/jekyll_pages_api_search
Other
39 stars 8 forks source link

Fix v0.3.1 #13

Closed mbland closed 8 years ago

mbland commented 8 years ago

12 and, subsequently, v0.3.1 fixed the "incompatible character encoding" problem on some platforms, but the search widget stopped working. The first problem was that I added the make-bundle npm script, and capturing the standard output from that script into assets/js/search-bundle.js also captured the info preamble from the npm command. This PR fixes that problem by capturing the output directly from browserify by giving it -o assets/js/search-bundle.js arguments.

After fixing that, the widget still didn't work because I also updated angular-livesearch, which wasn't locked to a specific version, and that update contained a breaking change to the API of the widget's callback.

This PR rectifies that problem by updating assets/js/search.js to use the new API and locking angular-livesearch to a specific commit.

This PR also adds an in-process gzip for assets/js/search-bundle.js.gz since it's more portable, and a rake clean target.

Verified locally that everything works as expected now.

cc: @jcscottiii @afeld @andrewmaier