You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great to have a turnkey Lunr.js implementation in the template. I'm a big fan of Lunr and this is so easy to get started with so once again, thanks for your great work:-)
I have 2000 posts on my blog and this caused a build timeout on gh-pages. Once source of timeout was building the Lunr index file into every post.
I changed your template so that the index is built just once and then called via <script> in each post. I also truncated the text that gets indexed to reduce the size of the index file. If I was more clever I'd break it into a 'search' experience and an 'advance search' experience where the advanced search would do a lazy loading of a larger index file. Maybe for another time...
I've broken the process into separate files using includes:
_includes/search-lunr.html
and also building the index as a page:
_pages/build-lunr-index.html
It still works:
If any of this is useful let me know and I'll try and package it up a bit more sensibly and do a pull request.
The text was updated successfully, but these errors were encountered:
lrdj
changed the title
Lunr implementation in default template creates overload with larger blogs
Lunr.js implementation in default template creates overload with larger blogs
Mar 20, 2020
lrdj
changed the title
Lunr.js implementation in default template creates overload with larger blogs
Lunr.js implementation in default template creates gh-pages build timeout with larger blogs
Mar 20, 2020
Great to have a turnkey Lunr.js implementation in the template. I'm a big fan of Lunr and this is so easy to get started with so once again, thanks for your great work:-)
I have 2000 posts on my blog and this caused a build timeout on gh-pages. Once source of timeout was building the Lunr index file into every post.
I changed your template so that the index is built just once and then called via <script> in each post. I also truncated the text that gets indexed to reduce the size of the index file. If I was more clever I'd break it into a 'search' experience and an 'advance search' experience where the advanced search would do a lazy loading of a larger index file. Maybe for another time...
I've broken the process into separate files using includes:
_includes/search-lunr.html
and also building the index as a page:
_pages/build-lunr-index.html
It still works:
If any of this is useful let me know and I'll try and package it up a bit more sensibly and do a pull request.
Template hacks are in my repo:
https://github.com/lrdj/donkey
The text was updated successfully, but these errors were encountered: