mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-26 20:27:00 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 633e52c4be | |||
| 1512bcf808 | |||
| 4e46d088ca | |||
| 388c7ffd32 | |||
| 7ba8653935 | |||
| a4403aad1e |
+10
@@ -1,5 +1,15 @@
|
||||
# Release notes
|
||||
|
||||
## 0.7.1
|
||||
- Update `fs-extra` to `0.10.0` (fixes potential race conditions)
|
||||
|
||||
## 0.7.0
|
||||
- Add page break in ebook (pdf, epub, mobi) between chapters/articles
|
||||
- Start using kramed instead of marked
|
||||
- Fix display of inline math
|
||||
- Switch to graceful-fs to fix EMFILE errors
|
||||
- Add sharing to weibo.com
|
||||
|
||||
## 0.6.2
|
||||
- Support generating a plugin's book info dynamically
|
||||
- Improve navigation on dark theme
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gitbook",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.1",
|
||||
"homepage": "http://www.gitbook.io/",
|
||||
"description": "Library and cmd utility to generate GitBooks",
|
||||
"main": "lib/index.js",
|
||||
@@ -15,7 +15,7 @@
|
||||
"fstream-ignore": "0.0.7",
|
||||
"commander": "2.2.0",
|
||||
"graceful-fs": "3.0.2",
|
||||
"fs-extra": "0.8.1",
|
||||
"fs-extra": "0.10.0",
|
||||
"highlight.js": "8.0.0",
|
||||
"tmp": "0.0.23",
|
||||
"semver": "2.2.1",
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -6,8 +6,9 @@ define([
|
||||
"core/progress",
|
||||
"core/exercise",
|
||||
"core/quiz",
|
||||
"core/loading"
|
||||
], function($, URL, events, state, progress, exercises, quiz, loading) {
|
||||
"core/loading",
|
||||
"core/search"
|
||||
], function($, URL, events, state, progress, exercises, quiz, loading, search) {
|
||||
var prev, next;
|
||||
|
||||
var usePushState = (typeof history.pushState !== "undefined");
|
||||
@@ -55,6 +56,8 @@ define([
|
||||
|
||||
// Update state
|
||||
state.update($("html"));
|
||||
// recover search keyword
|
||||
search.recover();
|
||||
preparePage();
|
||||
})
|
||||
.fail(function (e) {
|
||||
@@ -146,4 +149,5 @@ define([
|
||||
goNext: goNext,
|
||||
goPrev: goPrev
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -81,18 +81,34 @@ define([
|
||||
}
|
||||
if (q.length == 0) {
|
||||
sidebar.filter(null);
|
||||
storage.remove("keyword");
|
||||
} else {
|
||||
var results = search(q);
|
||||
sidebar.filter(
|
||||
_.pluck(results, "path")
|
||||
);
|
||||
storage.set("keyword", q);
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
// filter sidebar menu with current search keyword
|
||||
var recoverSearch = function() {
|
||||
var keyword = storage.get("keyword", "");
|
||||
if(keyword.length > 0) {
|
||||
if(!isSearchOpen()){
|
||||
toggleSearch();
|
||||
}
|
||||
sidebar.filter(_.pluck(search(keyword), "path"));
|
||||
}
|
||||
$(".book-search input").val(keyword);
|
||||
};
|
||||
|
||||
return {
|
||||
init: init,
|
||||
search: search,
|
||||
toggle: toggleSearch
|
||||
toggle: toggleSearch,
|
||||
recover:recoverSearch
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user