Closed anthonygore closed 7 years ago
Since the search and population of the template is async, it's difficult to modify the page any further. I've added a hook which runs after the results are shown. Now you can do something like this:
$('#search-query').lunrSearch({ indexUrl : '/lunr/index.json', results : '#search-results', template : '#search-results-template', titleMsg : '<div class="search-results-message"><h3>Search results<h3></div>', emptyMsg : '<div class="search-results-message"><h3>Nothing found!</h3><div><p>Show <a href="/search/?q=">all posts</a>.</p></div></div>', onAfterResultShow : function() { $().updateShareCounts(); } });
Great, thanks for the pull request @anthonygore.
Since the search and population of the template is async, it's difficult to modify the page any further. I've added a hook which runs after the results are shown. Now you can do something like this: