From 137a93c7b2eb79e22cd3a934eaefc72cbd1f02a0 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Mon, 17 Apr 2017 14:32:38 +0200 Subject: [PATCH 1/7] Add JS MythBusters to showcase (#148) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6c84b449e..7f06bb97f 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ These open-source projects are using docsify to generate their sites. Pull reque | [Vudash](http://vudash.github.io/vudash/) | Powerful, Flexible, Open Source dashboards for anything | | [Trilogy](http://trilogy.js.org) | No-hassle SQLite with a Promise-based, document store style API. | | [Mybatis-Plus](http://mp.baomidou.com/) | An enhanced toolkit of Mybatis to simplify development | +| [JS MythBusters](https://mythbusters.js.org) | An optimization handbook from a high level point of view. | ## Similar projects From 6911fb879bbe883dfa4e7de55abd740fb4b46611 Mon Sep 17 00:00:00 2001 From: Frances Coronel Date: Thu, 20 Apr 2017 18:02:39 -0400 Subject: [PATCH 2/7] Add hire-me to showcase section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7f06bb97f..9f9e18567 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ These open-source projects are using docsify to generate their sites. Pull reque | [Trilogy](http://trilogy.js.org) | No-hassle SQLite with a Promise-based, document store style API. | | [Mybatis-Plus](http://mp.baomidou.com/) | An enhanced toolkit of Mybatis to simplify development | | [JS MythBusters](https://mythbusters.js.org) | An optimization handbook from a high level point of view. | +| [hire-me](https://fvcproductions.github.io/hire-me) | A path to getting an awesome tech gig. | ## Similar projects From d7b0d1b949136dc8ffcbd84fa0c3d9ea290a6362 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 25 Apr 2017 12:13:56 +0800 Subject: [PATCH 3/7] docs: update cdn --- docs/cdn.md | 5 ++++- docs/de-de/cdn.md | 4 +++- docs/zh-cn/cdn.md | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/cdn.md b/docs/cdn.md index 63f318ba5..8b8e6e031 100644 --- a/docs/cdn.md +++ b/docs/cdn.md @@ -44,4 +44,7 @@ Alternatively, use [compressed files](#compressed-files). ## Other CDN -[jsDelivr](http://www.jsdelivr.com/projects/docsify) is available. +- http://www.bootcdn.cn/docsify +- http://www.jsdelivr.com/projects/docsify +- https://cdnjs.com/libraries/docsify + diff --git a/docs/de-de/cdn.md b/docs/de-de/cdn.md index 20d44abec..fe14c8f03 100644 --- a/docs/de-de/cdn.md +++ b/docs/de-de/cdn.md @@ -44,4 +44,6 @@ Alternativ kannst du auch die [komprimierten Dateien](#komprimierte-dateien) ver ## Andere CDN -[jsDelivr](http://www.jsdelivr.com/projects/docsify) ist auch verfügbar. +- http://www.bootcdn.cn/docsify +- http://www.jsdelivr.com/projects/docsify +- https://cdnjs.com/libraries/docsify diff --git a/docs/zh-cn/cdn.md b/docs/zh-cn/cdn.md index b9697f5ee..faf14960d 100644 --- a/docs/zh-cn/cdn.md +++ b/docs/zh-cn/cdn.md @@ -44,5 +44,6 @@ JS 的压缩文件是原有文件路径的基础上加 `.min`后缀 ## 其他 CDN -[jsDelivr](http://www.jsdelivr.com/projects/docsify) 也是可用的,具体用法参考其文档。 - +- http://www.bootcdn.cn/docsify +- http://www.jsdelivr.com/projects/docsify +- https://cdnjs.com/libraries/docsify From 2653849a3ed1d16ec36cf3733bac203761b964db Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 25 Apr 2017 12:39:58 +0800 Subject: [PATCH 4/7] fix(external-script): script attrs --- src/plugins/external-script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/external-script.js b/src/plugins/external-script.js index f27f7279a..43a8a893c 100644 --- a/src/plugins/external-script.js +++ b/src/plugins/external-script.js @@ -8,8 +8,8 @@ function handleExternalScript () { if (script && script.src) { const newScript = document.createElement('script') - ;['src', 'async', 'defer'].forEach(attribute => { - newScript[attribute] = script[attribute] + Array.prototype.slice.call(script.attributes).forEach(attribute => { + newScript[attribute.name] = attribute.value }) script.parentNode.insertBefore(newScript, script) From 11c94b2149b545faabd89e2763ba3f114293a985 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 25 Apr 2017 12:41:02 +0800 Subject: [PATCH 5/7] changelog 3.6.3 --- CHANGELOG.md | 54 +++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83a515f7a..39ea54b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,118 +1,124 @@ -# 3.6.2/ 2017-04-12 +# Changelog + +## 3.6.3 / 2017-04-25 + + * fix(external-script): script attrs + +## 3.6.2/ 2017-04-12 * feat(external-script): detect more than one script dom, fixed #146 * GA: Send hash instead of complete href (#147) -# 3.6.1 / 2017-04-09 +## 3.6.1 / 2017-04-09 * feat(event): Collapse the sidebar when click outside element in the small screen -# 3.6.0 / 2017-04-09 +## 3.6.0 / 2017-04-09 * feat(render): add mergeNavbar option, close ([#125](https://github.com/QingWei-Li/docsify/issues/125) -# 3.5.2/ 2017-04-05 +## 3.5.2/ 2017-04-05 * add optional current route param to toURL and use it to properly compose local anchor links * fix code style by removing semicolons * in toURL test for anchor links and if so prepend the currentPath to the generated path. fixes ([#142](https://github.com/QingWei-Li/docsify/issues/142)) -# 3.5.1 / 2017-03-25 +## 3.5.1 / 2017-03-25 * fix: .md file extension regex -# 3.5.0 / 2017-03-25 +## 3.5.0 / 2017-03-25 * feat(route): auto remove .md extension * fix: adjust display on small screens [@jrappen](https://github.com/jrappen) * fix: navbar labels for German [@jrappen](https://github.com/jrappen) -# 3.4.4 / 2017-03-17 +## 3.4.4 / 2017-03-17 * fix(search): fix input style * fix search plugin match bug -# 3.4.3 / 2017-03-16 +## 3.4.3 / 2017-03-16 * Add ability to ignore headers when generating toc ([#127](https://github.com/QingWei-Li/docsify/issues/127) [@christopherwk210](https://github.com/christopherwk210)) * fix external-script not inserting script at right place [@Leopoldthecoder](https://github.com/Leopoldthecoder) * add German docs [@jrappen](https://github.com/jrappen) -# 3.4.2 / 2017-03-11 +## 3.4.2 / 2017-03-11 * feat(emojify): add no-emoji option -# 3.4.1 / 2017-03-10 +## 3.4.1 / 2017-03-10 * fix(dom): Disable the dom cache when vue is present, fixed [#119](https://github.com/QingWei-Li/docsify/issues/119) * update english docs, [@jrappen](https://github.com/jrappen) -# 3.4.0 / 2017-03-09 +## 3.4.0 / 2017-03-09 * feat(zoom-image): add plugin -# 3.3.0 / 2017-03-07 +## 3.3.0 / 2017-03-07 * add front-matter plugin * add external-script plugin, [@Leopoldthecoder](https://github.com/Leopoldthecoder) * Fix nav showing while loading ([#112](https://github.com/QingWei-Li/docsify/issues/112)) -# 3.2.0 / 2017-02-28 +## 3.2.0 / 2017-02-28 * fix(render): Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106) * feat(search): Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103) * fix(fetch): load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100) * feat(render) nameLink for each route, fixed [#99](https://github.com/QingWei-Li/docsify/issues/99) -# 3.1.2 / 2017-02-27 +## 3.1.2 / 2017-02-27 * fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) -# 3.1.1 / 2017-02-24 +## 3.1.1 / 2017-02-24 * fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) * fix(render): custom cover background image * fix(tpl): extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101) -# 3.1.0 / 2017-02-22 +## 3.1.0 / 2017-02-22 * fix(search): incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90) * feat(emoji): add emoji plugin -# 3.0.5 / 2017-02-21 +## 3.0.5 / 2017-02-21 * feat(pwa): add sw.js * fix(layout.css): loading style * fix(event): highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86) * fix(gen-tree): cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88) -# 3.0.4 / 2017-02-20 +## 3.0.4 / 2017-02-20 * fix(render): execute script * fix(render): disable rendering sub list when loadSidebar is false -# 3.0.3 / 2017-02-19 +## 3.0.3 / 2017-02-19 * fixed look of links in blockquote * fix(scroll) highlight bug -# 3.0.2 / 2017-02-19 +## 3.0.2 / 2017-02-19 * fix(search): add lazy input * fix(compiler): link -# 3.0.1 / 2017-02-19 +## 3.0.1 / 2017-02-19 * fix(route): empty alias -# 3.0.0 / 2017-02-19 +## 3.0.0 / 2017-02-19 -#### Breaking change +##### Breaking change * Not support IE9 * The route becomes: `/#/page?id=slug`. The previous route will be redirected -#### Features +##### Features * Faster rendering * Clearer source code From a5f6ccd1d1638ba7e4aa17151c34132db78968e5 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 25 Apr 2017 12:41:16 +0800 Subject: [PATCH 6/7] bump: 3.6.3 --- lib/plugins/external-script.js | 12 ++++++------ lib/plugins/external-script.min.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/plugins/external-script.js b/lib/plugins/external-script.js index 710fb3bd8..09777af31 100644 --- a/lib/plugins/external-script.js +++ b/lib/plugins/external-script.js @@ -6,20 +6,20 @@ function handleExternalScript () { var container = Docsify.dom.getNode('#main'); var scripts = Docsify.dom.findAll(container, 'script'); - var loop = function ( i ) { + for (var i = scripts.length; i--;) { var script = scripts[i]; if (script && script.src) { - var newScript = document.createElement('script');['src', 'async', 'defer'].forEach(function (attribute) { - newScript[attribute] = script[attribute]; + var newScript = document.createElement('script'); + + Array.prototype.slice.call(script.attributes).forEach(function (attribute) { + newScript[attribute.name] = attribute.value; }); script.parentNode.insertBefore(newScript, script); script.parentNode.removeChild(script); } - }; - - for (var i = scripts.length; i--;) loop( i ); + } } var install = function (hook) { diff --git a/lib/plugins/external-script.min.js b/lib/plugins/external-script.min.js index 79e26d8e2..27a016c8c 100644 --- a/lib/plugins/external-script.min.js +++ b/lib/plugins/external-script.min.js @@ -1 +1 @@ -this.D=this.D||{},function(){"use strict";function n(){for(var n=Docsify.dom.getNode("#main"),i=Docsify.dom.findAll(n,"script"),o=function(n){var o=i[n];if(o&&o.src){var c=document.createElement("script");["src","async","defer"].forEach(function(n){c[n]=o[n]}),o.parentNode.insertBefore(c,o),o.parentNode.removeChild(o)}},c=i.length;c--;)o(c)}var i=function(i){i.doneEach(n)};window.$docsify.plugins=[].concat(i,window.$docsify.plugins)}(); +this.D=this.D||{},function(){"use strict";function e(){for(var e=Docsify.dom.getNode("#main"),i=Docsify.dom.findAll(e,"script"),o=i.length;o--;){var t=i[o];if(t&&t.src){var n=document.createElement("script");Array.prototype.slice.call(t.attributes).forEach(function(e){n[e.name]=e.value}),t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t)}}}var i=function(i){i.doneEach(e)};window.$docsify.plugins=[].concat(i,window.$docsify.plugins)}(); From 2c277b8f7934e24b9e4f6071a514e705f246ac72 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 25 Apr 2017 12:41:29 +0800 Subject: [PATCH 7/7] -> v3.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5de0660ab..f5c88fbd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docsify", - "version": "3.6.2", + "version": "3.6.3", "description": "A magical documentation generator.", "author": { "name": "qingwei-li",