summaryrefslogtreecommitdiffstats
path: root/theme/assets/app.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-06 17:06:01 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-06 17:06:01 -0700
commit536c48096938ef141fdf4351739f8362e80641da (patch)
treea53b74da69d10db8e6e1a9485c3127c76f4f6207 /theme/assets/app.js
parentd14bd7245f704205e06d25db9a3b614ca3b11930 (diff)
downloadgitbook-536c48096938ef141fdf4351739f8362e80641da.zip
gitbook-536c48096938ef141fdf4351739f8362e80641da.tar.gz
gitbook-536c48096938ef141fdf4351739f8362e80641da.tar.bz2
Fix loading of search index in sub directories
Diffstat (limited to 'theme/assets/app.js')
-rw-r--r--theme/assets/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/theme/assets/app.js b/theme/assets/app.js
index 6efa9c0..ec6285f 100644
--- a/theme/assets/app.js
+++ b/theme/assets/app.js
@@ -18088,7 +18088,8 @@ define('core/state',[
'$book': $book,
'githubId': $book.data("github"),
- 'level': $book.data("level")
+ 'level': $book.data("level"),
+ 'basePath': $book.data("basepath")
};
});
/*global define:false */
@@ -19107,7 +19108,6 @@ define('core/sidebar',[
// 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);
@@ -21018,7 +21018,7 @@ define('core/search',[
// 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);
});