Compare commits

...
9 Commits
15 changed files with 172 additions and 138 deletions
+20
View File
@@ -1,3 +1,23 @@
<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>
## [4.6.9](https://github.com/QingWei-Li/docsify/compare/v4.6.8...v4.6.9) (2018-03-10)
### Bug Fixes
* upgrade medium-zoom, fixed [#417](https://github.com/QingWei-Li/docsify/issues/417) ([6a3d69a](https://github.com/QingWei-Li/docsify/commit/6a3d69a))
<a name="4.6.8"></a>
## [4.6.8](https://github.com/QingWei-Li/docsify/compare/v4.6.7...v4.6.8) (2018-03-06)
+1 -1
View File
@@ -97,7 +97,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
<a href="https://github.com/QingWei-Li/docsify/graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
## License
+1 -1
View File
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>4.6.8</small>
# docsify <small>4.6.10</small>
> A magical documentation site generator.
+1 -1
View File
@@ -62,7 +62,7 @@
return editHtml
+ html
+ '\n----\n'
+ '\n\n----\n\n'
+ '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
})
}
+1 -1
View File
@@ -43,7 +43,7 @@
return editHtml
+ html
+ '\n----\n'
+ '\n\n----\n\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
+62 -58
View File
@@ -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.8';
Docsify.version = '4.6.10';
/**
* Run Docsify
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -8
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.6.8",
"version": "4.6.10",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -2915,8 +2915,7 @@
"jsbn": {
"version": "0.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"json-schema": {
"version": "0.2.3",
@@ -3334,8 +3333,7 @@
"tweetnacl": {
"version": "0.14.5",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"uid-number": {
"version": "0.0.6",
@@ -5021,9 +5019,9 @@
"dev": true
},
"medium-zoom": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-0.3.0.tgz",
"integrity": "sha512-26CJAykAcm1IYx2XjUB04dmZ7iRLtyTDKZSrm5kEqHJWVMo7pafUZEPcRGvYCNWW4f1utlEOzbtbaOvwNg7g1g=="
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-0.4.0.tgz",
"integrity": "sha512-0z7yMfd6I1BTCAa8QaR4cp5AqDkQD571GzhHIbbfefKEssGLSvs+4Xai/itOAncm4FBlF5gUoMQ22yW9/f8Sig=="
},
"mem": {
"version": "1.1.0",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.6.8",
"version": "4.6.10",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
@@ -42,7 +42,7 @@
},
"dependencies": {
"marked": "^0.3.12",
"medium-zoom": "^0.3.0",
"medium-zoom": "^0.4.0",
"opencollective": "^1.0.3",
"prismjs": "^1.9.0",
"tinydate": "^1.0.0",
+1 -1
View File
@@ -37,5 +37,5 @@
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
}
},
"version": "4.6.8"
"version": "4.6.10"
}
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.6.8",
"version": "4.6.10",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
+60 -58
View File
@@ -1,68 +1,70 @@
import {merge, hyphenate, isPrimitive, hasOwn} from './util/core'
const 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
)
export default function () {
const 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
)
const script =
document.currentScript ||
[].slice
.call(document.getElementsByTagName('script'))
.filter(n => /docsify\./.test(n.src))[0]
const script =
document.currentScript ||
[].slice
.call(document.getElementsByTagName('script'))
.filter(n => /docsify\./.test(n.src))[0]
if (script) {
for (const prop in config) {
if (hasOwn.call(config, prop)) {
const val = script.getAttribute('data-' + hyphenate(prop))
if (script) {
for (const prop in config) {
if (hasOwn.call(config, prop)) {
const 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
return config
}
window.$docsify = config
export default config
+1 -1
View File
@@ -9,7 +9,7 @@ import {isFn} from '../util/core'
export function initMixin(proto) {
proto._init = function () {
const vm = this
vm.config = config || {}
vm.config = config()
initLifecycle(vm) // Init hooks
initPlugin(vm) // Install plugins