mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
[build] 4.6.10
This commit is contained in:
parent
62b7578468
commit
cb1a56d89b
@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>4.6.9</small>
|
||||
# docsify <small>4.6.10</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
|
||||
120
lib/docsify.js
120
lib/docsify.js
@ -60,70 +60,74 @@ function isFn(obj) {
|
||||
return typeof obj === 'function'
|
||||
}
|
||||
|
||||
var config = merge(
|
||||
{
|
||||
el: '#app',
|
||||
repo: '',
|
||||
maxLevel: 6,
|
||||
subMaxLevel: 0,
|
||||
loadSidebar: null,
|
||||
loadNavbar: null,
|
||||
homepage: 'README.md',
|
||||
coverpage: '',
|
||||
basePath: '',
|
||||
auto2top: false,
|
||||
name: '',
|
||||
themeColor: '',
|
||||
nameLink: window.location.pathname,
|
||||
autoHeader: false,
|
||||
executeScript: null,
|
||||
noEmoji: false,
|
||||
ga: '',
|
||||
ext: '.md',
|
||||
mergeNavbar: false,
|
||||
formatUpdated: '',
|
||||
externalLinkTarget: '_blank',
|
||||
routerMode: 'hash',
|
||||
noCompileLinks: []
|
||||
},
|
||||
window.$docsify
|
||||
);
|
||||
function config () {
|
||||
var config = merge(
|
||||
{
|
||||
el: '#app',
|
||||
repo: '',
|
||||
maxLevel: 6,
|
||||
subMaxLevel: 0,
|
||||
loadSidebar: null,
|
||||
loadNavbar: null,
|
||||
homepage: 'README.md',
|
||||
coverpage: '',
|
||||
basePath: '',
|
||||
auto2top: false,
|
||||
name: '',
|
||||
themeColor: '',
|
||||
nameLink: window.location.pathname,
|
||||
autoHeader: false,
|
||||
executeScript: null,
|
||||
noEmoji: false,
|
||||
ga: '',
|
||||
ext: '.md',
|
||||
mergeNavbar: false,
|
||||
formatUpdated: '',
|
||||
externalLinkTarget: '_blank',
|
||||
routerMode: 'hash',
|
||||
noCompileLinks: []
|
||||
},
|
||||
window.$docsify
|
||||
);
|
||||
|
||||
var script =
|
||||
document.currentScript ||
|
||||
[].slice
|
||||
.call(document.getElementsByTagName('script'))
|
||||
.filter(function (n) { return /docsify\./.test(n.src); })[0];
|
||||
var script =
|
||||
document.currentScript ||
|
||||
[].slice
|
||||
.call(document.getElementsByTagName('script'))
|
||||
.filter(function (n) { return /docsify\./.test(n.src); })[0];
|
||||
|
||||
if (script) {
|
||||
for (var prop in config) {
|
||||
if (hasOwn.call(config, prop)) {
|
||||
var val = script.getAttribute('data-' + hyphenate(prop));
|
||||
if (script) {
|
||||
for (var prop in config) {
|
||||
if (hasOwn.call(config, prop)) {
|
||||
var val = script.getAttribute('data-' + hyphenate(prop));
|
||||
|
||||
if (isPrimitive(val)) {
|
||||
config[prop] = val === '' ? true : val;
|
||||
if (isPrimitive(val)) {
|
||||
config[prop] = val === '' ? true : val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.loadSidebar === true) {
|
||||
config.loadSidebar = '_sidebar' + config.ext;
|
||||
}
|
||||
if (config.loadNavbar === true) {
|
||||
config.loadNavbar = '_navbar' + config.ext;
|
||||
}
|
||||
if (config.coverpage === true) {
|
||||
config.coverpage = '_coverpage' + config.ext;
|
||||
}
|
||||
if (config.repo === true) {
|
||||
config.repo = '';
|
||||
}
|
||||
if (config.name === true) {
|
||||
config.name = '';
|
||||
}
|
||||
}
|
||||
|
||||
if (config.loadSidebar === true) {
|
||||
config.loadSidebar = '_sidebar' + config.ext;
|
||||
}
|
||||
if (config.loadNavbar === true) {
|
||||
config.loadNavbar = '_navbar' + config.ext;
|
||||
}
|
||||
if (config.coverpage === true) {
|
||||
config.coverpage = '_coverpage' + config.ext;
|
||||
}
|
||||
if (config.repo === true) {
|
||||
config.repo = '';
|
||||
}
|
||||
if (config.name === true) {
|
||||
config.name = '';
|
||||
}
|
||||
}
|
||||
window.$docsify = config;
|
||||
|
||||
window.$docsify = config;
|
||||
return config
|
||||
}
|
||||
|
||||
function initLifecycle(vm) {
|
||||
var hooks = [
|
||||
@ -4494,7 +4498,7 @@ function initFetch(vm) {
|
||||
function initMixin(proto) {
|
||||
proto._init = function () {
|
||||
var vm = this;
|
||||
vm.config = config || {};
|
||||
vm.config = config();
|
||||
|
||||
initLifecycle(vm); // Init hooks
|
||||
initPlugin(vm); // Install plugins
|
||||
@ -4573,7 +4577,7 @@ initGlobalAPI();
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.6.9';
|
||||
Docsify.version = '4.6.10';
|
||||
|
||||
/**
|
||||
* 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.9"
|
||||
"version": "4.6.10"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.6.9",
|
||||
"version": "4.6.10",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user