bump 1.7.4

This commit is contained in:
qingwei.li 2017-01-13 23:33:04 +08:00
parent fb8bf89d73
commit 336efb30cb
3 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>1.7.3</small>
# docsify <small>1.7.4</small>
> A magical documentation site generator.

View File

@ -2621,9 +2621,12 @@ function renderCover (content) {
if (renderCover.rendered) { return sticky() }
// render cover
var cacheToc = toc.slice();
var html = markdown(content);
var match = html.trim().match('<p><img[^s]+src="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$');
toc = cacheToc.slice();
// render background
if (match) {
var coverEl = document.querySelector('section.cover');
@ -2703,11 +2706,13 @@ var script = document.currentScript || [].slice.call(document.getElementsByTagNa
if (script) {
for (var prop in OPTIONS) {
var val = script.getAttribute('data-' + camel2kebab(prop));
OPTIONS[prop] = isNil(val) ? OPTIONS[prop] : (typeof OPTIONS[prop] === 'string' ? val : true);
OPTIONS[prop] = isNil(val) ? OPTIONS[prop] : (val || true);
}
if (OPTIONS.loadSidebar === true) { OPTIONS.loadSidebar = '_sidebar.md'; }
if (OPTIONS.loadNavbar === true) { OPTIONS.loadNavbar = '_navbar.md'; }
if (OPTIONS.coverpage === true) { OPTIONS.coverpage = '_coverpage.md'; }
if (OPTIONS.repo === true) { OPTIONS.repo = ''; }
if (OPTIONS.name === true) { OPTIONS.name = ''; }
if (OPTIONS.sidebar) { OPTIONS.sidebar = window[OPTIONS.sidebar]; }
}

4
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long