-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please update lunr.js #25
Comments
Wow - that escalated quickly. Tomorrow will be one year since we updated to 0.7.0 - and they now are at 2.0.1! :) A PR would be really welcome for this. If not, I'll try to do this whenever I have some time - I can't promise that'd be soon, though. Thanks for the heads up! |
@matiasgarciaisaia sure, glad to help! Just tried updating to lunr.js v2.0.2 but I'm getting this error for every resource:
For some reason Any clue why that could be? |
A If you get an There's an Upgrading guide at lunrjs.com that specifies that the API changed about indexing, so you should take a look at that for upgrading The upgrade could be easy to do, or maybe not - I'm not sure how the lunr.js changes will impact on the extension. Give it a shot and, if you get to a dead end, ping me back next week 👍 |
For a starter, lunr.js doesn't provide a minified lunr.min.js on it's repo since v2.0 (since olivernn/lunr.js@2a57c53, actually). So we should handle minifying it somehow. Then we have to adapt our code so it's compatible with the new API. |
Thanks for the pointers. Unfortunately I've had very little time to get this going, but I've made some small progress. After implementing the new API changes all seemed fine, and the specified pages were indexed. But after refreshing search.json in the browser it was appeared empty.
Yea I noticed this as well, so I minified it manually for now. Also, in middleman-search the language files (i18n) are not minified. But lunr-languages now offers minified files, so I suggest including those (or both?). They forgot to minify the Japanese files, which I brought to their attention in a an issue. |
Hey, if you have any questions about the changes or run into any problems with Lunr please let me know, I'll try and help if I can. |
I also have problems with a second generation of search.json during a single |
FWIW, I'm using @sn3p's update branch and the only change I'm seeing is a much lighter search.json. (At https://github.com/gerwitz/hans.gerwitz.com/ ) |
I can confirm that this is working just fine, in our case the index file went from 650kb to 770kb. |
Any chance of merging this in? |
The gem currently includes lunr.js v0.7.0, but the latest version is v2.0.1.
Thanks in advance!
The text was updated successfully, but these errors were encountered: