mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
[build] 4.6.4
This commit is contained in:
parent
123c516836
commit
1335baa22f
@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>4.6.3</small>
|
||||
# docsify <small>4.6.4</small>
|
||||
|
||||
> 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); });
|
||||
};
|
||||
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
2
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
@ -37,5 +37,5 @@
|
||||
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
|
||||
}
|
||||
},
|
||||
"version": "4.6.3"
|
||||
"version": "4.6.4"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.6.3",
|
||||
"version": "4.6.4",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user