Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea14d67164 | ||
|
|
85e3c68158 |
8 changed files with 78 additions and 64 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,3 +1,13 @@
|
||||||
|
<a name="4.6.10"></a>
|
||||||
|
## [4.6.10](https://github.com/QingWei-Li/docsify/compare/v4.6.9...v4.6.10) (2018-03-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* async install config, fixed [#425](https://github.com/QingWei-Li/docsify/issues/425) ([e4e011c](https://github.com/QingWei-Li/docsify/commit/e4e011c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.6.9"></a>
|
<a name="4.6.9"></a>
|
||||||
## [4.6.9](https://github.com/QingWei-Li/docsify/compare/v4.6.8...v4.6.9) (2018-03-10)
|
## [4.6.9](https://github.com/QingWei-Li/docsify/compare/v4.6.8...v4.6.9) (2018-03-10)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||

|

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