[build] 4.6.4
This commit is contained in:
parent
123c516836
commit
1335baa22f
5 changed files with 43 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
||||||

|

|
||||||
|
|
||||||
# docsify <small>4.6.3</small>
|
# docsify <small>4.6.4</small>
|
||||||
|
|
||||||
> A magical documentation site generator.
|
> A magical documentation site generator.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3747,7 +3747,7 @@ function renderMixin (proto) {
|
||||||
callHook(this$1, 'afterEach', html, function (text) { return renderMain.call(this$1, text); });
|
callHook(this$1, 'afterEach', html, function (text) { return renderMain.call(this$1, text); });
|
||||||
};
|
};
|
||||||
if (this$1.isHTML) {
|
if (this$1.isHTML) {
|
||||||
html = this$1.result;
|
html = this$1.result = text;
|
||||||
callback();
|
callback();
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -4177,14 +4177,39 @@ function fetchMixin (proto) {
|
||||||
var loadNavbar = ref$1.loadNavbar;
|
var loadNavbar = ref$1.loadNavbar;
|
||||||
var loadSidebar = ref$1.loadSidebar;
|
var loadSidebar = ref$1.loadSidebar;
|
||||||
var requestHeaders = ref$1.requestHeaders;
|
var requestHeaders = ref$1.requestHeaders;
|
||||||
|
var fallbackLanguages = ref$1.fallbackLanguages;
|
||||||
// Abort last request
|
// Abort last request
|
||||||
last && last.abort && last.abort();
|
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
|
// 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 () {
|
var loadSideAndNav = function () {
|
||||||
if (!loadSidebar) { return cb() }
|
if (!loadSidebar) { return cb() }
|
||||||
|
|
@ -4199,14 +4224,15 @@ function fetchMixin (proto) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load main content
|
// Load main content
|
||||||
last.then(
|
last
|
||||||
function (text, opt) {
|
.then(
|
||||||
this$1._renderMain(text, opt, loadSideAndNav);
|
function (text, opt) {
|
||||||
},
|
this$1._renderMain(text, opt, loadSideAndNav);
|
||||||
function (_) {
|
},
|
||||||
this$1._renderMain(null, {}, loadSideAndNav);
|
function (_) {
|
||||||
}
|
return getFallBackPage(file) || this$1._renderMain(null, {}, loadSideAndNav)
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// Load nav
|
// Load nav
|
||||||
loadNavbar &&
|
loadNavbar &&
|
||||||
|
|
@ -4379,7 +4405,7 @@ initGlobalAPI();
|
||||||
/**
|
/**
|
||||||
* Version
|
* Version
|
||||||
*/
|
*/
|
||||||
Docsify.version = '4.6.3';
|
Docsify.version = '4.6.4';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run Docsify
|
* Run Docsify
|
||||||
|
|
|
||||||
2
lib/docsify.min.js
vendored
2
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -37,5 +37,5 @@
|
||||||
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
|
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "4.6.3"
|
"version": "4.6.4"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "docsify-server-renderer",
|
"name": "docsify-server-renderer",
|
||||||
"version": "4.6.3",
|
"version": "4.6.4",
|
||||||
"description": "docsify server renderer",
|
"description": "docsify server renderer",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "qingwei-li",
|
"name": "qingwei-li",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue