Fix loading of search index in sub directories

This commit is contained in:
Samy Pessé
2014-04-06 17:06:01 -07:00
parent d14bd7245f
commit 536c480969
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ define([
// Load complete index
var loadIndex = function() {
return $.getJSON("search_index.json")
return $.getJSON(state.basePath+"/search_index.json")
.then(function(data) {
index = lunr.Index.load(data);
});
-1
View File
@@ -38,7 +38,6 @@ define([
// Filter summary with a list of path
var filterSummary = function(paths) {
console.log("filter with", paths);
$summary.find("li").each(function() {
var path = $(this).data("path");
var st = paths == null || _.contains(paths, path);
+2 -1
View File
@@ -7,6 +7,7 @@ define([
'$book': $book,
'githubId': $book.data("github"),
'level': $book.data("level")
'level': $book.data("level"),
'basePath': $book.data("basepath")
};
});