-
Notifications
You must be signed in to change notification settings - Fork 105
error on build? #1
Comments
Thanks for giving the plugin a whirl, sorry it didn't actually work! I'll take a look at the problem tonight. Running it through your actual Jekyll site should make it straightforward to track down and fix. |
Thanks! Also thanks for answering my query on SO about memory, good to know. I'm t also features on-demand loading of the search plugin .js when focusing so perhaps it wouldn't be necessary to do that, since if I understand On Thu, Mar 7, 2013 at 2:26 AM, Ben Smith notifications@github.com wrote:
Carl Boettiger |
The on-demand loading isn't included in the plugin at the moment, but here's a gist of the JavaScript that I'm using to achieve this on the homepage of my website. https://gist.github.com/slashdotdash/a9441baea14228ab84be Here's the actual focus wireup and on-demand js loading part. It only does this once, regardless of how many times the input field gets focus.
Using this approach both the .js file and index JSON data are not actually requested from the server (or loaded into memory) until the user clicks/focuses on the search input field. |
Minified version can be included in standard https://gist.github.com/slashdotdash/a9441baea14228ab84be#file-on-demand-search-min-js |
Above commit should fix your issue Carl. I've run the plugin on your site, albeit with all others removed, and it generated the Let me know if you encounter any problems. |
Thanks! That definitely fixed the ruby end, I can verify that search.json is being created correctly. The site now builds successfully ..., but I don't seem to be getting the javascript to run on my I haven't added the "load on select" script yet,but still probably me doing something stupid with the javascript. Thanks for the help! |
Had a play around and eventually got it working, couple of things were causing it to be unhappy.
|
Also the Mustache search results template needs to be as follows (some of the Jekyll tags were stripped on the blog post). {% raw %} <script id="search-results-template" type="text/mustache"> {{#entries}}{{#date}}{{displaydate}}{{/date}} {{title}}{{/entries}} </script>{% endraw %} |
thanks. I've followed these changes but still no dice. Does search on the You've already gone above the call of duty I think in replying to my Snapshot of my current build here: The search page looks like a functional match to the one at On Sun, Mar 10, 2013 at 3:38 AM, Ben Smith notifications@github.com wrote:
Carl Boettiger |
I'll send send you a pull request with the changes I made to get search working. |
This looks like a great plugin, thanks for sharing.
Probably missing something simple here, but after following your directions I get the following error on build:
If you care to have a look, my instance with your search mechanism enabled is on this branch here: https://github.com/cboettig/labnotebook/tree/site-search
(note that on that branch your search method is just implemented on the search.html page, the search in the navbar uses my former local search, adapted from marran)
The text was updated successfully, but these errors were encountered: