[build] 4.6.4

This commit is contained in:
qingwei.li 2018-03-01 22:42:48 +08:00
parent 123c516836
commit 1335baa22f
5 changed files with 43 additions and 17 deletions

View File

@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>4.6.3</small>
# docsify <small>4.6.4</small>
> A magical documentation site generator.

View File

@ -3747,7 +3747,7 @@ function renderMixin (proto) {
callHook(this$1, 'afterEach', html, function (text) { return renderMain.call(this$1, text); });
};
if (this$1.isHTML) {
html = this$1.result;
html = this$1.result = text;
callback();
next();
} else {
@ -4177,14 +4177,39 @@ function fetchMixin (proto) {
var loadNavbar = ref$1.loadNavbar;
var loadSidebar = ref$1.loadSidebar;
var requestHeaders = ref$1.requestHeaders;
var fallbackLanguages = ref$1.fallbackLanguages;
// Abort last request
last && last.abort && last.abort();
last = get(this.router.getFile(path) + qs, true, requestHeaders);
var file = this.router.getFile(path);
last = get(file + qs, true, requestHeaders);
// Current page is html
this.isHTML = /\.html$/g.test(path);
this.isHTML = /\.html$/g.test(file);
var getFallBackPage = function (file) {
if (!fallbackLanguages) {
return false
}
var local = file.split('/')[1];
if (fallbackLanguages.indexOf(local) === -1) {
return false
}
file = file.replace(new RegExp(("^/" + local)), '');
return get(file + qs, true, requestHeaders)
.then(
function (text, opt) {
this$1._renderMain(text, opt, loadSideAndNav);
},
function (_) {
return this$1._renderMain(null, {}, loadSideAndNav)
}
)
};
var loadSideAndNav = function () {
if (!loadSidebar) { return cb() }
@ -4199,14 +4224,15 @@ function fetchMixin (proto) {
};
// Load main content
last.then(
function (text, opt) {
this$1._renderMain(text, opt, loadSideAndNav);
},
function (_) {
this$1._renderMain(null, {}, loadSideAndNav);
}
);
last
.then(
function (text, opt) {
this$1._renderMain(text, opt, loadSideAndNav);
},
function (_) {
return getFallBackPage(file) || this$1._renderMain(null, {}, loadSideAndNav)
}
);
// Load nav
loadNavbar &&
@ -4379,7 +4405,7 @@ initGlobalAPI();
/**
* Version
*/
Docsify.version = '4.6.3';
Docsify.version = '4.6.4';
/**
* Run Docsify

2
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -37,5 +37,5 @@
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
}
},
"version": "4.6.3"
"version": "4.6.4"
}

View File

@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.6.3",
"version": "4.6.4",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",