Fix search.json url for realZ this time

This commit is contained in:
Michael Rose 2013-09-12 08:13:48 -04:00
parent f30520be41
commit 6eab0eaa0d
4 changed files with 38 additions and 37 deletions

View file

@ -1,6 +1,42 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script> <script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="{{ site.url }}/assets/js/scripts.min.js"></script> <script src="{{ site.url }}/assets/js/scripts.min.js"></script>
{% if site.search %}
<!-- Jekyll Simple Search option -->
<script>
$(document).ready(function() {
$('.search-field').simpleJekyllSearch({
jsonFile : '{{ site.url }}/search.json',
searchResults : '.search-results',
template : '<li><article><a href="{url}">{title} <span class="entry-date"><time datetime="{date}">{shortdate}</time></span></a></article></li>',
noResults: '<p>Nothing found.</p>'
});
});
(function( $, window, undefined ) {
var bs = {
close: $(".icon-remove-sign"),
searchform: $(".search-form"),
canvas: $("body"),
dothis: $('.dosearch')
};
bs.dothis.on('click', function() {
$('.search-wrapper').css({ display: "block" });
bs.searchform.toggleClass('active');
bs.searchform.find('input').focus();
bs.canvas.toggleClass('search-overlay');
});
bs.close.on('click', function() {
$('.search-wrapper').removeAttr( 'style' );
bs.searchform.toggleClass('active');
bs.canvas.removeClass('search-overlay');
});
})( jQuery, window );
</script>
{% endif %}
{% if site.google_analytics %} {% if site.google_analytics %}
<!-- Asynchronous Google Analytics snippet --> <!-- Asynchronous Google Analytics snippet -->
<script> <script>

View file

@ -27,37 +27,3 @@ $('#site-nav').click(function(event){
$(function() { $(function() {
$("article").fitVids(); $("article").fitVids();
}); });
// Simple Jekyll Search options
$(document).ready(function() {
$('.search-field').simpleJekyllSearch({
jsonFile : '{siteurl}/search.json',
searchResults : '.search-results',
template : '<li><article><a href="{url}">{title} <span class="entry-date"><time datetime="{date}">{shortdate}</time></span></a></article></li>',
noResults: '<p>Nothing found.</p>'
});
});
(function( $, window, undefined ) {
var bs = {
close: $(".icon-remove-sign"),
searchform: $(".search-form"),
canvas: $("body"),
dothis: $('.dosearch')
};
bs.dothis.on('click', function() {
$('.search-wrapper').css({ display: "block" });
bs.searchform.toggleClass('active');
bs.searchform.find('input').focus();
bs.canvas.toggleClass('search-overlay');
});
bs.close.on('click', function() {
$('.search-wrapper').removeAttr( 'style' );
bs.searchform.toggleClass('active');
bs.canvas.removeClass('search-overlay');
});
})( jQuery, window );

File diff suppressed because one or more lines are too long

View file

@ -3,7 +3,6 @@
[ [
{% for post in site.posts %} {% for post in site.posts %}
{ {
"siteurl" : "{{ site.url }}",
"title" : "{{ post.title | escape }}", "title" : "{{ post.title | escape }}",
"category" : "{{ post.category }}", "category" : "{{ post.category }}",
"url" : "{{ site.url }}{{ post.url }}", "url" : "{{ site.url }}{{ post.url }}",