mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
bump 1.7.4
This commit is contained in:
parent
fb8bf89d73
commit
336efb30cb
@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>1.7.3</small>
|
||||
# docsify <small>1.7.4</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
|
||||
@ -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
4
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user