Skip to content

Commit

Permalink
Attempt to fix search.json file not found errors
Browse files Browse the repository at this point in the history
- Add BASE_URL variable to scripts.html _include to create an absolute URL in search.js for search.json
  • Loading branch information
mmistakes committed Jan 22, 2015
1 parent 93e8f26 commit c25fad7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script type="text/javascript">
var BASE_URL = '{{ site.url }}';
</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 src="{{ site.url }}/assets/js/scripts.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion assets/js/plugins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function toggleLoadingClass() {
* @return null
*/
function getSearchResults(callbackFunction) {
$.get(jsonFeedUrl, callbackFunction, 'json');
$.get(BASE_URL + jsonFeedUrl, callbackFunction, 'json');
}


Expand Down
Loading

0 comments on commit c25fad7

Please sign in to comment.