mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 13:26:34 +10:00
Compare commits
50
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89389e786a | ||
|
|
a35531967a | ||
|
|
bc4d06bb16 | ||
|
|
29d9cda3de | ||
|
|
140bf10377 | ||
|
|
dfd31b5de7 | ||
|
|
d1c72686bb | ||
|
|
8cd786c9d5 | ||
|
|
b53571810b | ||
|
|
cb53106fa7 | ||
|
|
fd86c727af | ||
|
|
69ef489210 | ||
|
|
c3345ba20c | ||
|
|
1447c8a40a | ||
|
|
3b952ac7c3 | ||
|
|
6ac7bace21 | ||
|
|
28beff80f7 | ||
|
|
049726e11e | ||
|
|
a257a4ab4e | ||
|
|
a07a613312 | ||
|
|
4db8cd6abf | ||
|
|
a72e7490c3 | ||
|
|
cc79e2e992 | ||
|
|
5b6525b8f1 | ||
|
|
aa719e3a47 | ||
|
|
22a5927eaf | ||
|
|
5ab9d8cb87 | ||
|
|
f84242d380 | ||
|
|
1a945d445a | ||
|
|
81ec7c763b | ||
|
|
d91a66cadd | ||
|
|
58b130996e | ||
|
|
ee800a6572 | ||
|
|
6daecc8a68 | ||
|
|
325ecd08e6 | ||
|
|
9a09458eee | ||
|
|
fdd8826b3b | ||
|
|
fcd1087c16 | ||
|
|
ab19b13210 | ||
|
|
5fcf210dd1 | ||
|
|
2edf47ec73 | ||
|
|
b52607dec9 | ||
|
|
e89a2b3fea | ||
|
|
239eb3503b | ||
|
|
fce40eae25 | ||
|
|
d35059dd0b | ||
|
|
4f588e0af4 | ||
|
|
22ab7dfd14 | ||
|
|
4805cb5322 | ||
|
|
2bc880d335 |
+232
-165
@@ -1,147 +1,214 @@
|
||||
<a name="4.9.1"></a>
|
||||
## [4.9.1](https://github.com/docsifyjs/docsify/compare/v4.9.0...v4.9.1) (2019-02-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* github assets url ([#774](https://github.com/docsifyjs/docsify/issues/774)) ([140bf10](https://github.com/docsifyjs/docsify/commit/140bf10))
|
||||
|
||||
|
||||
|
||||
<a name="4.9.0"></a>
|
||||
# [4.9.0](https://github.com/docsifyjs/docsify/compare/v4.8.6...v4.9.0) (2019-02-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* task list rendering (Fix [#749](https://github.com/docsifyjs/docsify/issues/749)) ([#757](https://github.com/docsifyjs/docsify/issues/757)) ([69ef489](https://github.com/docsifyjs/docsify/commit/69ef489))
|
||||
* upgrade npm-run-all ([049726e](https://github.com/docsifyjs/docsify/commit/049726e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **search-plugin:** add namespace option ([#706](https://github.com/docsifyjs/docsify/issues/706)) ([28beff8](https://github.com/docsifyjs/docsify/commit/28beff8))
|
||||
* Add new theme "dolphin" ([#735](https://github.com/docsifyjs/docsify/issues/735)) ([c3345ba](https://github.com/docsifyjs/docsify/commit/c3345ba))
|
||||
* Provide code fragments feature ([#748](https://github.com/docsifyjs/docsify/issues/748)) ([1447c8a](https://github.com/docsifyjs/docsify/commit/1447c8a))
|
||||
|
||||
|
||||
|
||||
<a name="4.8.6"></a>
|
||||
## [4.8.6](https://github.com/docsifyjs/docsify/compare/v4.8.5...v4.8.6) (2018-11-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* IE10 compatibility ([#691](https://github.com/docsifyjs/docsify/issues/691)) ([4db8cd6](https://github.com/docsifyjs/docsify/commit/4db8cd6))
|
||||
|
||||
|
||||
|
||||
<a name="4.8.5"></a>
|
||||
## [4.8.5](https://github.com/docsifyjs/docsify/compare/v4.8.4...v4.8.5) (2018-11-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* expose version info for Docsify, fixed [#641](https://github.com/docsifyjs/docsify/issues/641) ([aa719e3](https://github.com/docsifyjs/docsify/commit/aa719e3))
|
||||
|
||||
|
||||
|
||||
<a name="4.8.4"></a>
|
||||
## [4.8.4](https://github.com/docsifyjs/docsify/compare/v4.8.3...v4.8.4) (2018-11-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cover:** Compatible with legacy styles, fixed [#677](https://github.com/docsifyjs/docsify/issues/677) ([#678](https://github.com/docsifyjs/docsify/issues/678)) ([1a945d4](https://github.com/docsifyjs/docsify/commit/1a945d4))
|
||||
|
||||
|
||||
|
||||
<a name="4.8.3"></a>
|
||||
|
||||
## [4.8.3](https://github.com/docsifyjs/docsify/compare/v4.8.2...v4.8.3) (2018-11-01)
|
||||
|
||||
Fix the last release files has the old version marked...
|
||||
|
||||
<a name="4.8.2"></a>
|
||||
|
||||
## [4.8.2](https://github.com/docsifyjs/docsify/compare/v4.8.1...v4.8.2) (2018-11-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- cover button style, fixed [#670](https://github.com/docsifyjs/docsify/issues/670), fixed [#665](https://github.com/docsifyjs/docsify/issues/665) ([#675](https://github.com/docsifyjs/docsify/issues/675)) ([fcd1087](https://github.com/docsifyjs/docsify/commit/fcd1087))
|
||||
- update match regex ([#669](https://github.com/docsifyjs/docsify/issues/669)) ([2edf47e](https://github.com/docsifyjs/docsify/commit/2edf47e))
|
||||
- use copy of cached value ([#668](https://github.com/docsifyjs/docsify/issues/668)) ([5fcf210](https://github.com/docsifyjs/docsify/commit/5fcf210))
|
||||
- **compiler:** import prism-markup-templating, fixed [#672](https://github.com/docsifyjs/docsify/issues/672) ([#676](https://github.com/docsifyjs/docsify/issues/676)) ([fdd8826](https://github.com/docsifyjs/docsify/commit/fdd8826))
|
||||
|
||||
### Features
|
||||
|
||||
- add heading config id ([#671](https://github.com/docsifyjs/docsify/issues/671)) ([ab19b13](https://github.com/docsifyjs/docsify/commit/ab19b13))
|
||||
|
||||
<a name="4.8.1"></a>
|
||||
|
||||
## [4.8.1](https://github.com/docsifyjs/docsify/compare/v4.8.0...v4.8.1) (2018-10-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- ssr package dep, fixed [#605](https://github.com/docsifyjs/docsify/issues/605) ([2bc880d](https://github.com/docsifyjs/docsify/commit/2bc880d))
|
||||
- **compiler:** extra quotes for codeblock ([4f588e0](https://github.com/docsifyjs/docsify/commit/4f588e0))
|
||||
- **compiler:** prevent render of html code in paragraph, fixed [#663](https://github.com/docsifyjs/docsify/issues/663) ([d35059d](https://github.com/docsifyjs/docsify/commit/d35059d))
|
||||
|
||||
### Features
|
||||
|
||||
- upgrade PrismJS, fixed [#534](https://github.com/docsifyjs/docsify/issues/534) ([4805cb5](https://github.com/docsifyjs/docsify/commit/4805cb5))
|
||||
|
||||
<a name="4.8.0"></a>
|
||||
|
||||
# [4.8.0](https://github.com/docsifyjs/docsify/compare/v4.7.1...v4.8.0) (2018-10-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Cache TOC for later usage in the case of cached file html ([#649](https://github.com/docsifyjs/docsify/issues/649)) ([9e86017](https://github.com/docsifyjs/docsify/commit/9e86017))
|
||||
* improve external script plugin ([#632](https://github.com/docsifyjs/docsify/issues/632)) ([50c2434](https://github.com/docsifyjs/docsify/commit/50c2434))
|
||||
* missing variable declaration ([#660](https://github.com/docsifyjs/docsify/issues/660)) ([1ce37bd](https://github.com/docsifyjs/docsify/commit/1ce37bd))
|
||||
* Remove target for mailto links ([#652](https://github.com/docsifyjs/docsify/issues/652)) ([18f0f03](https://github.com/docsifyjs/docsify/commit/18f0f03))
|
||||
* Update getAllPath query selector ([#653](https://github.com/docsifyjs/docsify/issues/653)) ([f6f4e32](https://github.com/docsifyjs/docsify/commit/f6f4e32))
|
||||
* Update vue.styl ([#634](https://github.com/docsifyjs/docsify/issues/634)) ([bf060be](https://github.com/docsifyjs/docsify/commit/bf060be))
|
||||
|
||||
- Cache TOC for later usage in the case of cached file html ([#649](https://github.com/docsifyjs/docsify/issues/649)) ([9e86017](https://github.com/docsifyjs/docsify/commit/9e86017))
|
||||
- improve external script plugin ([#632](https://github.com/docsifyjs/docsify/issues/632)) ([50c2434](https://github.com/docsifyjs/docsify/commit/50c2434))
|
||||
- missing variable declaration ([#660](https://github.com/docsifyjs/docsify/issues/660)) ([1ce37bd](https://github.com/docsifyjs/docsify/commit/1ce37bd))
|
||||
- Remove target for mailto links ([#652](https://github.com/docsifyjs/docsify/issues/652)) ([18f0f03](https://github.com/docsifyjs/docsify/commit/18f0f03))
|
||||
- Update getAllPath query selector ([#653](https://github.com/docsifyjs/docsify/issues/653)) ([f6f4e32](https://github.com/docsifyjs/docsify/commit/f6f4e32))
|
||||
- Update vue.styl ([#634](https://github.com/docsifyjs/docsify/issues/634)) ([bf060be](https://github.com/docsifyjs/docsify/commit/bf060be))
|
||||
|
||||
### Features
|
||||
|
||||
* Add docsify version to $window.docsify object ([#641](https://github.com/docsifyjs/docsify/issues/641)) ([94bc415](https://github.com/docsifyjs/docsify/commit/94bc415)), closes [#521](https://github.com/docsifyjs/docsify/issues/521)
|
||||
* **compiler:** support embedded mermaid ([#629](https://github.com/docsifyjs/docsify/issues/629)) ([42ea8af](https://github.com/docsifyjs/docsify/commit/42ea8af))
|
||||
* Add hideOtherSidebarContent option ([#661](https://github.com/docsifyjs/docsify/issues/661)) ([4a23c4a](https://github.com/docsifyjs/docsify/commit/4a23c4a))
|
||||
* Allow base64, external, and relative logo values ([#642](https://github.com/docsifyjs/docsify/issues/642)) ([0a0802a](https://github.com/docsifyjs/docsify/commit/0a0802a)), closes [#577](https://github.com/docsifyjs/docsify/issues/577)
|
||||
* upgrade marked to 0.5.x, fixed [#645](https://github.com/docsifyjs/docsify/issues/645), close [#644](https://github.com/docsifyjs/docsify/issues/644) ([#662](https://github.com/docsifyjs/docsify/issues/662)) ([a39b214](https://github.com/docsifyjs/docsify/commit/a39b214))
|
||||
|
||||
|
||||
- Add docsify version to $window.docsify object ([#641](https://github.com/docsifyjs/docsify/issues/641)) ([94bc415](https://github.com/docsifyjs/docsify/commit/94bc415)), closes [#521](https://github.com/docsifyjs/docsify/issues/521)
|
||||
- **compiler:** support embedded mermaid ([#629](https://github.com/docsifyjs/docsify/issues/629)) ([42ea8af](https://github.com/docsifyjs/docsify/commit/42ea8af))
|
||||
- Add hideOtherSidebarContent option ([#661](https://github.com/docsifyjs/docsify/issues/661)) ([4a23c4a](https://github.com/docsifyjs/docsify/commit/4a23c4a))
|
||||
- Allow base64, external, and relative logo values ([#642](https://github.com/docsifyjs/docsify/issues/642)) ([0a0802a](https://github.com/docsifyjs/docsify/commit/0a0802a)), closes [#577](https://github.com/docsifyjs/docsify/issues/577)
|
||||
- upgrade marked to 0.5.x, fixed [#645](https://github.com/docsifyjs/docsify/issues/645), close [#644](https://github.com/docsifyjs/docsify/issues/644) ([#662](https://github.com/docsifyjs/docsify/issues/662)) ([a39b214](https://github.com/docsifyjs/docsify/commit/a39b214))
|
||||
|
||||
<a name="4.7.1"></a>
|
||||
|
||||
## [4.7.1](https://github.com/docsifyjs/docsify/compare/v4.7.0...v4.7.1) (2018-08-30)
|
||||
|
||||
|
||||
|
||||
<a name="4.7.0"></a>
|
||||
|
||||
# [4.7.0](https://github.com/QingWei-Li/docsify/compare/v4.6.9...v4.7.0) (2018-06-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* alldow addition content in sidebar, fix [#518](https://github.com/QingWei-Li/docsify/issues/518), fix 539 ([#543](https://github.com/QingWei-Li/docsify/issues/543)) ([04b36b0](https://github.com/QingWei-Li/docsify/commit/04b36b0))
|
||||
* async install config, fixed [#425](https://github.com/QingWei-Li/docsify/issues/425) ([e4e011c](https://github.com/QingWei-Li/docsify/commit/e4e011c))
|
||||
* loading embed files synchronously, fixed [#525](https://github.com/QingWei-Li/docsify/issues/525), fixed [#527](https://github.com/QingWei-Li/docsify/issues/527) ([#544](https://github.com/QingWei-Li/docsify/issues/544)) ([feea7f9](https://github.com/QingWei-Li/docsify/commit/feea7f9))
|
||||
* path include chinese character cause hilight bug ([#556](https://github.com/QingWei-Li/docsify/issues/556)) ([a5f333a](https://github.com/QingWei-Li/docsify/commit/a5f333a))
|
||||
|
||||
- alldow addition content in sidebar, fix [#518](https://github.com/QingWei-Li/docsify/issues/518), fix 539 ([#543](https://github.com/QingWei-Li/docsify/issues/543)) ([04b36b0](https://github.com/QingWei-Li/docsify/commit/04b36b0))
|
||||
- async install config, fixed [#425](https://github.com/QingWei-Li/docsify/issues/425) ([e4e011c](https://github.com/QingWei-Li/docsify/commit/e4e011c))
|
||||
- loading embed files synchronously, fixed [#525](https://github.com/QingWei-Li/docsify/issues/525), fixed [#527](https://github.com/QingWei-Li/docsify/issues/527) ([#544](https://github.com/QingWei-Li/docsify/issues/544)) ([feea7f9](https://github.com/QingWei-Li/docsify/commit/feea7f9))
|
||||
- path include chinese character cause hilight bug ([#556](https://github.com/QingWei-Li/docsify/issues/556)) ([a5f333a](https://github.com/QingWei-Li/docsify/commit/a5f333a))
|
||||
|
||||
### Features
|
||||
|
||||
* add logo option, [#264](https://github.com/QingWei-Li/docsify/issues/264) ([#541](https://github.com/QingWei-Li/docsify/issues/541)) ([ee72dd0](https://github.com/QingWei-Li/docsify/commit/ee72dd0))
|
||||
* add unpkg field, close [#531](https://github.com/QingWei-Li/docsify/issues/531) ([#558](https://github.com/QingWei-Li/docsify/issues/558)) ([5c0de0a](https://github.com/QingWei-Li/docsify/commit/5c0de0a))
|
||||
* support image resizing, resolve [#508](https://github.com/QingWei-Li/docsify/issues/508) ([#545](https://github.com/QingWei-Li/docsify/issues/545)) ([3a7ad62](https://github.com/QingWei-Li/docsify/commit/3a7ad62))
|
||||
|
||||
|
||||
- add logo option, [#264](https://github.com/QingWei-Li/docsify/issues/264) ([#541](https://github.com/QingWei-Li/docsify/issues/541)) ([ee72dd0](https://github.com/QingWei-Li/docsify/commit/ee72dd0))
|
||||
- add unpkg field, close [#531](https://github.com/QingWei-Li/docsify/issues/531) ([#558](https://github.com/QingWei-Li/docsify/issues/558)) ([5c0de0a](https://github.com/QingWei-Li/docsify/commit/5c0de0a))
|
||||
- support image resizing, resolve [#508](https://github.com/QingWei-Li/docsify/issues/508) ([#545](https://github.com/QingWei-Li/docsify/issues/545)) ([3a7ad62](https://github.com/QingWei-Li/docsify/commit/3a7ad62))
|
||||
|
||||
<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))
|
||||
|
||||
|
||||
- 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))
|
||||
|
||||
|
||||
- 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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* resolve path of image and embed files, fixed [#412](https://github.com/QingWei-Li/docsify/issues/412) ([bfd0d18](https://github.com/QingWei-Li/docsify/commit/bfd0d18))
|
||||
|
||||
|
||||
- resolve path of image and embed files, fixed [#412](https://github.com/QingWei-Li/docsify/issues/412) ([bfd0d18](https://github.com/QingWei-Li/docsify/commit/bfd0d18))
|
||||
|
||||
<a name="4.6.7"></a>
|
||||
|
||||
## [4.6.7](https://github.com/QingWei-Li/docsify/compare/v4.6.6...v4.6.7) (2018-03-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* layout css, fixed [#409](https://github.com/QingWei-Li/docsify/issues/409) ([aeb692e](https://github.com/QingWei-Li/docsify/commit/aeb692e))
|
||||
|
||||
|
||||
- layout css, fixed [#409](https://github.com/QingWei-Li/docsify/issues/409) ([aeb692e](https://github.com/QingWei-Li/docsify/commit/aeb692e))
|
||||
|
||||
<a name="4.6.6"></a>
|
||||
|
||||
## [4.6.6](https://github.com/QingWei-Li/docsify/compare/v4.6.5...v4.6.6) (2018-03-03)
|
||||
|
||||
|
||||
|
||||
<a name="4.6.5"></a>
|
||||
|
||||
## [4.6.5](https://github.com/QingWei-Li/docsify/compare/v4.6.4...v4.6.5) (2018-03-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **navbar:** Now Navbar isn't append to DOM when loadNavbar is falsy ([#407](https://github.com/QingWei-Li/docsify/issues/407)) ([0933445](https://github.com/QingWei-Li/docsify/commit/0933445))
|
||||
|
||||
- **navbar:** Now Navbar isn't append to DOM when loadNavbar is falsy ([#407](https://github.com/QingWei-Li/docsify/issues/407)) ([0933445](https://github.com/QingWei-Li/docsify/commit/0933445))
|
||||
|
||||
### Features
|
||||
|
||||
* **config:** Add 404 page options. ([#406](https://github.com/QingWei-Li/docsify/issues/406)) ([9b3b445](https://github.com/QingWei-Li/docsify/commit/9b3b445))
|
||||
|
||||
|
||||
- **config:** Add 404 page options. ([#406](https://github.com/QingWei-Li/docsify/issues/406)) ([9b3b445](https://github.com/QingWei-Li/docsify/commit/9b3b445))
|
||||
|
||||
<a name="4.6.4"></a>
|
||||
## [4.6.4](https://github.com/QingWei-Li/docsify/compare/v4.6.3...v4.6.4) (2018-03-01)
|
||||
|
||||
## [4.6.4](https://github.com/QingWei-Li/docsify/compare/v4.6.3...v4.6.4) (2018-03-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **render:** Disable markdown parsing when the file is an HTML ([#403](https://github.com/QingWei-Li/docsify/issues/403)) ([278a75e](https://github.com/QingWei-Li/docsify/commit/278a75e))
|
||||
|
||||
- **render:** Disable markdown parsing when the file is an HTML ([#403](https://github.com/QingWei-Li/docsify/issues/403)) ([278a75e](https://github.com/QingWei-Li/docsify/commit/278a75e))
|
||||
|
||||
### Features
|
||||
|
||||
* **fetch:** Add fallback languages configuration. ([#402](https://github.com/QingWei-Li/docsify/issues/402)) ([ecc0e04](https://github.com/QingWei-Li/docsify/commit/ecc0e04))
|
||||
|
||||
|
||||
- **fetch:** Add fallback languages configuration. ([#402](https://github.com/QingWei-Li/docsify/issues/402)) ([ecc0e04](https://github.com/QingWei-Li/docsify/commit/ecc0e04))
|
||||
|
||||
<a name="4.6.3"></a>
|
||||
|
||||
## [4.6.3](https://github.com/QingWei-Li/docsify/compare/v4.6.2...v4.6.3) (2018-02-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **hook:** beforeEach don\'t work, fixed [#393](https://github.com/QingWei-Li/docsify/issues/393) ([6a09059](https://github.com/QingWei-Li/docsify/commit/6a09059))
|
||||
|
||||
|
||||
- **hook:** beforeEach don\'t work, fixed [#393](https://github.com/QingWei-Li/docsify/issues/393) ([6a09059](https://github.com/QingWei-Li/docsify/commit/6a09059))
|
||||
|
||||
<a name="4.6.2"></a>
|
||||
## [4.6.2](https://github.com/QingWei-Li/docsify/compare/v4.6.1...v4.6.2) (2018-02-14)
|
||||
|
||||
## [4.6.2](https://github.com/QingWei-Li/docsify/compare/v4.6.1...v4.6.2) (2018-02-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **embed:** broken in IE, fixed [#389](https://github.com/QingWei-Li/docsify/issues/389), fixed [#391](https://github.com/QingWei-Li/docsify/issues/391) ([45a7464](https://github.com/QingWei-Li/docsify/commit/45a7464))
|
||||
* **embed:** init value ([890a7bf](https://github.com/QingWei-Li/docsify/commit/890a7bf))
|
||||
|
||||
|
||||
- **embed:** broken in IE, fixed [#389](https://github.com/QingWei-Li/docsify/issues/389), fixed [#391](https://github.com/QingWei-Li/docsify/issues/391) ([45a7464](https://github.com/QingWei-Li/docsify/commit/45a7464))
|
||||
- **embed:** init value ([890a7bf](https://github.com/QingWei-Li/docsify/commit/890a7bf))
|
||||
|
||||
<a name="4.6.1"></a>
|
||||
|
||||
@@ -149,8 +216,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **embed** compatible ssr ([dc0c3ce](https://github.com/QingWei-Li/docsify/commit/dc0c3ce))
|
||||
* **embed** async fetch embed files, fixed [#387](https://github.com/QingWei-Li/docsify/issues/387)
|
||||
- **embed** compatible ssr ([dc0c3ce](https://github.com/QingWei-Li/docsify/commit/dc0c3ce))
|
||||
- **embed** async fetch embed files, fixed [#387](https://github.com/QingWei-Li/docsify/issues/387)
|
||||
|
||||
<a name="4.6.0"></a>
|
||||
|
||||
@@ -158,26 +225,26 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **search:** custom clear button, fixed [#271](https://github.com/QingWei-Li/docsify/issues/271) ([864aa18](https://github.com/QingWei-Li/docsify/commit/864aa18))
|
||||
* **search:** escape special characters for search, fixed [#369](https://github.com/QingWei-Li/docsify/issues/369) ([9755439](https://github.com/QingWei-Li/docsify/commit/9755439))
|
||||
* build config ([342438f](https://github.com/QingWei-Li/docsify/commit/342438f))
|
||||
* button style for coverpage, fixed [#362](https://github.com/QingWei-Li/docsify/issues/362) ([85428ef](https://github.com/QingWei-Li/docsify/commit/85428ef))
|
||||
* dropdown scroll style, fixed [#346](https://github.com/QingWei-Li/docsify/issues/346) ([c4d83f2](https://github.com/QingWei-Li/docsify/commit/c4d83f2))
|
||||
* highlight homepage link, fixed [#304](https://github.com/QingWei-Li/docsify/issues/304) ([f960c19](https://github.com/QingWei-Li/docsify/commit/f960c19))
|
||||
* homepage link ([e097f88](https://github.com/QingWei-Li/docsify/commit/e097f88))
|
||||
* onlyCover ([033be4f](https://github.com/QingWei-Li/docsify/commit/033be4f))
|
||||
* ssr compatible embedd ([ebc10c4](https://github.com/QingWei-Li/docsify/commit/ebc10c4))
|
||||
* ssr coverpage, fixed [#273](https://github.com/QingWei-Li/docsify/issues/273) ([9e824a4](https://github.com/QingWei-Li/docsify/commit/9e824a4))
|
||||
- **search:** custom clear button, fixed [#271](https://github.com/QingWei-Li/docsify/issues/271) ([864aa18](https://github.com/QingWei-Li/docsify/commit/864aa18))
|
||||
- **search:** escape special characters for search, fixed [#369](https://github.com/QingWei-Li/docsify/issues/369) ([9755439](https://github.com/QingWei-Li/docsify/commit/9755439))
|
||||
- build config ([342438f](https://github.com/QingWei-Li/docsify/commit/342438f))
|
||||
- button style for coverpage, fixed [#362](https://github.com/QingWei-Li/docsify/issues/362) ([85428ef](https://github.com/QingWei-Li/docsify/commit/85428ef))
|
||||
- dropdown scroll style, fixed [#346](https://github.com/QingWei-Li/docsify/issues/346) ([c4d83f2](https://github.com/QingWei-Li/docsify/commit/c4d83f2))
|
||||
- highlight homepage link, fixed [#304](https://github.com/QingWei-Li/docsify/issues/304) ([f960c19](https://github.com/QingWei-Li/docsify/commit/f960c19))
|
||||
- homepage link ([e097f88](https://github.com/QingWei-Li/docsify/commit/e097f88))
|
||||
- onlyCover ([033be4f](https://github.com/QingWei-Li/docsify/commit/033be4f))
|
||||
- ssr compatible embedd ([ebc10c4](https://github.com/QingWei-Li/docsify/commit/ebc10c4))
|
||||
- ssr coverpage, fixed [#273](https://github.com/QingWei-Li/docsify/issues/273) ([9e824a4](https://github.com/QingWei-Li/docsify/commit/9e824a4))
|
||||
|
||||
### Features
|
||||
|
||||
* click sidebar menu add collapse and expand, close [#294](https://github.com/QingWei-Li/docsify/issues/294) ([5e161a1](https://github.com/QingWei-Li/docsify/commit/5e161a1))
|
||||
* **compiler:** support embedded file as code block, close [#134](https://github.com/QingWei-Li/docsify/issues/134) ([761ccc2](https://github.com/QingWei-Li/docsify/commit/761ccc2))
|
||||
* **compiler:** support embedded markdown, html, video, etc files, close [#383](https://github.com/QingWei-Li/docsify/issues/383), close [#333](https://github.com/QingWei-Li/docsify/issues/333) ([524f52f](https://github.com/QingWei-Li/docsify/commit/524f52f))
|
||||
* **cover:** add onlyCover option, close [#382](https://github.com/QingWei-Li/docsify/issues/382) ([b265fdd](https://github.com/QingWei-Li/docsify/commit/b265fdd))
|
||||
* **fetch:** add requestHeaders option, fixed [#336](https://github.com/QingWei-Li/docsify/issues/336) ([54ab4c9](https://github.com/QingWei-Li/docsify/commit/54ab4c9))
|
||||
* **render:** add ext option for custom file extenstion, close [#340](https://github.com/QingWei-Li/docsify/issues/340) ([248aa72](https://github.com/QingWei-Li/docsify/commit/248aa72))
|
||||
* **render:** mutilple coverpage, close [#315](https://github.com/QingWei-Li/docsify/issues/315) ([f68ddf5](https://github.com/QingWei-Li/docsify/commit/f68ddf5))
|
||||
- click sidebar menu add collapse and expand, close [#294](https://github.com/QingWei-Li/docsify/issues/294) ([5e161a1](https://github.com/QingWei-Li/docsify/commit/5e161a1))
|
||||
- **compiler:** support embedded file as code block, close [#134](https://github.com/QingWei-Li/docsify/issues/134) ([761ccc2](https://github.com/QingWei-Li/docsify/commit/761ccc2))
|
||||
- **compiler:** support embedded markdown, html, video, etc files, close [#383](https://github.com/QingWei-Li/docsify/issues/383), close [#333](https://github.com/QingWei-Li/docsify/issues/333) ([524f52f](https://github.com/QingWei-Li/docsify/commit/524f52f))
|
||||
- **cover:** add onlyCover option, close [#382](https://github.com/QingWei-Li/docsify/issues/382) ([b265fdd](https://github.com/QingWei-Li/docsify/commit/b265fdd))
|
||||
- **fetch:** add requestHeaders option, fixed [#336](https://github.com/QingWei-Li/docsify/issues/336) ([54ab4c9](https://github.com/QingWei-Li/docsify/commit/54ab4c9))
|
||||
- **render:** add ext option for custom file extenstion, close [#340](https://github.com/QingWei-Li/docsify/issues/340) ([248aa72](https://github.com/QingWei-Li/docsify/commit/248aa72))
|
||||
- **render:** mutilple coverpage, close [#315](https://github.com/QingWei-Li/docsify/issues/315) ([f68ddf5](https://github.com/QingWei-Li/docsify/commit/f68ddf5))
|
||||
|
||||
<a name="4.5.9"></a>
|
||||
|
||||
@@ -185,7 +252,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* upgrade marked ([4157173](https://github.com/QingWei-Li/docsify/commit/4157173))
|
||||
- upgrade marked ([4157173](https://github.com/QingWei-Li/docsify/commit/4157173))
|
||||
|
||||
<a name="4.5.8"></a>
|
||||
|
||||
@@ -193,8 +260,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* cover style, fixed [#381](https://github.com/QingWei-Li/docsify/issues/381) ([368754e](https://github.com/QingWei-Li/docsify/commit/368754e))
|
||||
* updated deps ([#337](https://github.com/QingWei-Li/docsify/issues/337)) ([a12d393](https://github.com/QingWei-Li/docsify/commit/a12d393))
|
||||
- cover style, fixed [#381](https://github.com/QingWei-Li/docsify/issues/381) ([368754e](https://github.com/QingWei-Li/docsify/commit/368754e))
|
||||
- updated deps ([#337](https://github.com/QingWei-Li/docsify/issues/337)) ([a12d393](https://github.com/QingWei-Li/docsify/commit/a12d393))
|
||||
|
||||
<a name="4.5.7"></a>
|
||||
|
||||
@@ -202,7 +269,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* add navigation plugin, closed [#180](https://github.com/QingWei-Li/docsify/issues/180) ([f78be4c](https://github.com/QingWei-Li/docsify/commit/f78be4c))
|
||||
- add navigation plugin, closed [#180](https://github.com/QingWei-Li/docsify/issues/180) ([f78be4c](https://github.com/QingWei-Li/docsify/commit/f78be4c))
|
||||
|
||||
<a name="4.5.6"></a>
|
||||
|
||||
@@ -210,7 +277,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **style:** increase the tap targets of menu button, fixed [#325](https://github.com/QingWei-Li/docsify/issues/325) ([888f217](https://github.com/QingWei-Li/docsify/commit/888f217))
|
||||
- **style:** increase the tap targets of menu button, fixed [#325](https://github.com/QingWei-Li/docsify/issues/325) ([888f217](https://github.com/QingWei-Li/docsify/commit/888f217))
|
||||
|
||||
<a name="4.5.5"></a>
|
||||
|
||||
@@ -218,7 +285,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* disqus plugin issue ([#318](https://github.com/QingWei-Li/docsify/issues/318)) ([041b33e](https://github.com/QingWei-Li/docsify/commit/041b33e)), closes [#317](https://github.com/QingWei-Li/docsify/issues/317)
|
||||
- disqus plugin issue ([#318](https://github.com/QingWei-Li/docsify/issues/318)) ([041b33e](https://github.com/QingWei-Li/docsify/commit/041b33e)), closes [#317](https://github.com/QingWei-Li/docsify/issues/317)
|
||||
|
||||
<a name="4.5.4"></a>
|
||||
|
||||
@@ -226,11 +293,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **compiler:** task lists style, fixed [#215](https://github.com/QingWei-Li/docsify/issues/215) ([e43ded4](https://github.com/QingWei-Li/docsify/commit/e43ded4))
|
||||
- **compiler:** task lists style, fixed [#215](https://github.com/QingWei-Li/docsify/issues/215) ([e43ded4](https://github.com/QingWei-Li/docsify/commit/e43ded4))
|
||||
|
||||
### Features
|
||||
|
||||
* add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
|
||||
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
|
||||
|
||||
<a name="4.5.3"></a>
|
||||
|
||||
@@ -238,7 +305,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
|
||||
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
|
||||
|
||||
<a name="4.5.2"></a>
|
||||
|
||||
@@ -246,7 +313,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* github task lists, close [#215](https://github.com/QingWei-Li/docsify/issues/215) ([#305](https://github.com/QingWei-Li/docsify/issues/305)) ([d486eef](https://github.com/QingWei-Li/docsify/commit/d486eef))
|
||||
- github task lists, close [#215](https://github.com/QingWei-Li/docsify/issues/215) ([#305](https://github.com/QingWei-Li/docsify/issues/305)) ([d486eef](https://github.com/QingWei-Li/docsify/commit/d486eef))
|
||||
|
||||
<a name="4.5.1"></a>
|
||||
|
||||
@@ -254,7 +321,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* fetch files with the query params, fixed [#303](https://github.com/QingWei-Li/docsify/issues/303) ([2a2ed96](https://github.com/QingWei-Li/docsify/commit/2a2ed96))
|
||||
- fetch files with the query params, fixed [#303](https://github.com/QingWei-Li/docsify/issues/303) ([2a2ed96](https://github.com/QingWei-Li/docsify/commit/2a2ed96))
|
||||
|
||||
<a name="4.5.0"></a>
|
||||
|
||||
@@ -262,7 +329,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* add disqus plugin, closed [#123](https://github.com/QingWei-Li/docsify/issues/123) ([fd7d4e0](https://github.com/QingWei-Li/docsify/commit/fd7d4e0))
|
||||
- add disqus plugin, closed [#123](https://github.com/QingWei-Li/docsify/issues/123) ([fd7d4e0](https://github.com/QingWei-Li/docsify/commit/fd7d4e0))
|
||||
|
||||
<a name="4.4.1"></a>
|
||||
|
||||
@@ -270,8 +337,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* {docsify-ignore-all} and {docsify-ignore} bug ([#299](https://github.com/QingWei-Li/docsify/issues/299)) ([cc98f56](https://github.com/QingWei-Li/docsify/commit/cc98f56))
|
||||
* zoom image plugin issue, fixed [#187](https://github.com/QingWei-Li/docsify/issues/187) ([#300](https://github.com/QingWei-Li/docsify/issues/300)) ([fa772cf](https://github.com/QingWei-Li/docsify/commit/fa772cf))
|
||||
- {docsify-ignore-all} and {docsify-ignore} bug ([#299](https://github.com/QingWei-Li/docsify/issues/299)) ([cc98f56](https://github.com/QingWei-Li/docsify/commit/cc98f56))
|
||||
- zoom image plugin issue, fixed [#187](https://github.com/QingWei-Li/docsify/issues/187) ([#300](https://github.com/QingWei-Li/docsify/issues/300)) ([fa772cf](https://github.com/QingWei-Li/docsify/commit/fa772cf))
|
||||
|
||||
<a name="4.4.0"></a>
|
||||
|
||||
@@ -279,11 +346,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* sidebar style issue on firefox, fixed [#184](https://github.com/QingWei-Li/docsify/issues/184) ([#297](https://github.com/QingWei-Li/docsify/issues/297)) ([36bfc9d](https://github.com/QingWei-Li/docsify/commit/36bfc9d))
|
||||
- sidebar style issue on firefox, fixed [#184](https://github.com/QingWei-Li/docsify/issues/184) ([#297](https://github.com/QingWei-Li/docsify/issues/297)) ([36bfc9d](https://github.com/QingWei-Li/docsify/commit/36bfc9d))
|
||||
|
||||
### Features
|
||||
|
||||
* add helper for disabled link, fixed [#295](https://github.com/QingWei-Li/docsify/issues/295) ([#296](https://github.com/QingWei-Li/docsify/issues/296)) ([4ad96f3](https://github.com/QingWei-Li/docsify/commit/4ad96f3))
|
||||
- add helper for disabled link, fixed [#295](https://github.com/QingWei-Li/docsify/issues/295) ([#296](https://github.com/QingWei-Li/docsify/issues/296)) ([4ad96f3](https://github.com/QingWei-Li/docsify/commit/4ad96f3))
|
||||
|
||||
<a name="4.3.15"></a>
|
||||
|
||||
@@ -291,7 +358,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
|
||||
- scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
|
||||
|
||||
<a name="4.3.14"></a>
|
||||
|
||||
@@ -299,7 +366,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
|
||||
- codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
|
||||
|
||||
<a name="4.3.13"></a>
|
||||
|
||||
@@ -307,11 +374,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* duplicate results in search fixed [#257](https://github.com/QingWei-Li/docsify/issues/257) ([#284](https://github.com/QingWei-Li/docsify/issues/284)) ([3476f6f](https://github.com/QingWei-Li/docsify/commit/3476f6f))
|
||||
- duplicate results in search fixed [#257](https://github.com/QingWei-Li/docsify/issues/257) ([#284](https://github.com/QingWei-Li/docsify/issues/284)) ([3476f6f](https://github.com/QingWei-Li/docsify/commit/3476f6f))
|
||||
|
||||
### Features
|
||||
|
||||
* make whole search result clickable ([#285](https://github.com/QingWei-Li/docsify/issues/285)) ([1b91227](https://github.com/QingWei-Li/docsify/commit/1b91227))
|
||||
- make whole search result clickable ([#285](https://github.com/QingWei-Li/docsify/issues/285)) ([1b91227](https://github.com/QingWei-Li/docsify/commit/1b91227))
|
||||
|
||||
<a name="4.3.12"></a>
|
||||
|
||||
@@ -319,7 +386,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* incorrect active link ([#281](https://github.com/QingWei-Li/docsify/issues/281)) ([a3ab379](https://github.com/QingWei-Li/docsify/commit/a3ab379))
|
||||
- incorrect active link ([#281](https://github.com/QingWei-Li/docsify/issues/281)) ([a3ab379](https://github.com/QingWei-Li/docsify/commit/a3ab379))
|
||||
|
||||
<a name="4.3.11"></a>
|
||||
|
||||
@@ -327,7 +394,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* broken links to same page heading, fix [#278](https://github.com/QingWei-Li/docsify/issues/278), fix [#279](https://github.com/QingWei-Li/docsify/issues/279) ([91d6337](https://github.com/QingWei-Li/docsify/commit/91d6337))
|
||||
- broken links to same page heading, fix [#278](https://github.com/QingWei-Li/docsify/issues/278), fix [#279](https://github.com/QingWei-Li/docsify/issues/279) ([91d6337](https://github.com/QingWei-Li/docsify/commit/91d6337))
|
||||
|
||||
<a name="4.3.10"></a>
|
||||
|
||||
@@ -335,7 +402,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* link render issue after page refreshing ([#276](https://github.com/QingWei-Li/docsify/issues/276)) ([abd885e](https://github.com/QingWei-Li/docsify/commit/abd885e))
|
||||
- link render issue after page refreshing ([#276](https://github.com/QingWei-Li/docsify/issues/276)) ([abd885e](https://github.com/QingWei-Li/docsify/commit/abd885e))
|
||||
|
||||
<a name="4.3.9"></a>
|
||||
|
||||
@@ -343,7 +410,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* scroll issue in IE ([#275](https://github.com/QingWei-Li/docsify/issues/275)) ([3e94cb6](https://github.com/QingWei-Li/docsify/commit/3e94cb6))
|
||||
- scroll issue in IE ([#275](https://github.com/QingWei-Li/docsify/issues/275)) ([3e94cb6](https://github.com/QingWei-Li/docsify/commit/3e94cb6))
|
||||
|
||||
<a name="4.3.8"></a>
|
||||
|
||||
@@ -351,7 +418,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **slugify:** GitHub compatible heading links, fixed [#272](https://github.com/QingWei-Li/docsify/issues/272) ([9b4e666](https://github.com/QingWei-Li/docsify/commit/9b4e666))
|
||||
- **slugify:** GitHub compatible heading links, fixed [#272](https://github.com/QingWei-Li/docsify/issues/272) ([9b4e666](https://github.com/QingWei-Li/docsify/commit/9b4e666))
|
||||
|
||||
<a name="4.3.7"></a>
|
||||
|
||||
@@ -359,7 +426,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **slugify:** GitHub compatible heading links, fixed [#267](https://github.com/QingWei-Li/docsify/issues/267) ([c195d2d](https://github.com/QingWei-Li/docsify/commit/c195d2d))
|
||||
- **slugify:** GitHub compatible heading links, fixed [#267](https://github.com/QingWei-Li/docsify/issues/267) ([c195d2d](https://github.com/QingWei-Li/docsify/commit/c195d2d))
|
||||
|
||||
<a name="4.3.6"></a>
|
||||
|
||||
@@ -367,7 +434,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* style for codesponsor plugin ([08afec7](https://github.com/QingWei-Li/docsify/commit/08afec7))
|
||||
- style for codesponsor plugin ([08afec7](https://github.com/QingWei-Li/docsify/commit/08afec7))
|
||||
|
||||
<a name="4.3.5"></a>
|
||||
|
||||
@@ -375,11 +442,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* missed symbol ([#254](https://github.com/QingWei-Li/docsify/issues/254)) ([6c702d3](https://github.com/QingWei-Li/docsify/commit/6c702d3))
|
||||
- missed symbol ([#254](https://github.com/QingWei-Li/docsify/issues/254)) ([6c702d3](https://github.com/QingWei-Li/docsify/commit/6c702d3))
|
||||
|
||||
### Features
|
||||
|
||||
* **plugin:** add codesponsor plugin ([46ac4c3](https://github.com/QingWei-Li/docsify/commit/46ac4c3))
|
||||
- **plugin:** add codesponsor plugin ([46ac4c3](https://github.com/QingWei-Li/docsify/commit/46ac4c3))
|
||||
|
||||
<a name="4.3.4"></a>
|
||||
|
||||
@@ -387,7 +454,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* scroll position issue, fixed [#234](https://github.com/QingWei-Li/docsify/issues/234) ([388ed3d](https://github.com/QingWei-Li/docsify/commit/388ed3d))
|
||||
- scroll position issue, fixed [#234](https://github.com/QingWei-Li/docsify/issues/234) ([388ed3d](https://github.com/QingWei-Li/docsify/commit/388ed3d))
|
||||
|
||||
<a name="4.3.3"></a>
|
||||
|
||||
@@ -395,11 +462,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **buble.css:** tweaks code block style, fixed [#249](https://github.com/QingWei-Li/docsify/issues/249) ([9d43051](https://github.com/QingWei-Li/docsify/commit/9d43051))
|
||||
- **buble.css:** tweaks code block style, fixed [#249](https://github.com/QingWei-Li/docsify/issues/249) ([9d43051](https://github.com/QingWei-Li/docsify/commit/9d43051))
|
||||
|
||||
### Features
|
||||
|
||||
* add doc for react and vue demo box plugin ([#247](https://github.com/QingWei-Li/docsify/issues/247)) ([f0aca19](https://github.com/QingWei-Li/docsify/commit/f0aca19))
|
||||
- add doc for react and vue demo box plugin ([#247](https://github.com/QingWei-Li/docsify/issues/247)) ([f0aca19](https://github.com/QingWei-Li/docsify/commit/f0aca19))
|
||||
|
||||
<a name="4.3.2"></a>
|
||||
|
||||
@@ -407,11 +474,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* sidebar highlight ([f82f419](https://github.com/QingWei-Li/docsify/commit/f82f419))
|
||||
- sidebar highlight ([f82f419](https://github.com/QingWei-Li/docsify/commit/f82f419))
|
||||
|
||||
### Features
|
||||
|
||||
* add Edit on github plugin (thanks [@njleonzhang](https://github.com/njleonzhang)) ([a0e1ea8](https://github.com/QingWei-Li/docsify/commit/a0e1ea8))
|
||||
- add Edit on github plugin (thanks [@njleonzhang](https://github.com/njleonzhang)) ([a0e1ea8](https://github.com/QingWei-Li/docsify/commit/a0e1ea8))
|
||||
|
||||
<a name="4.3.1"></a>
|
||||
|
||||
@@ -419,7 +486,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
|
||||
- **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
|
||||
|
||||
<a name="4.3.0"></a>
|
||||
|
||||
@@ -427,7 +494,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
|
||||
- **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
|
||||
|
||||
<a name="4.2.9"></a>
|
||||
|
||||
@@ -435,7 +502,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ensure document ready before init Docsify [#233](https://github.com/QingWei-Li/docsify/issues/233)
|
||||
- ensure document ready before init Docsify [#233](https://github.com/QingWei-Li/docsify/issues/233)
|
||||
|
||||
<a name="4.2.8"></a>
|
||||
|
||||
@@ -443,7 +510,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **compiler:** support for setting target attribute for link, fixed [#230](https://github.com/QingWei-Li/docsify/issues/230) ([7f270f9](https://github.com/QingWei-Li/docsify/commit/7f270f9))
|
||||
- **compiler:** support for setting target attribute for link, fixed [#230](https://github.com/QingWei-Li/docsify/issues/230) ([7f270f9](https://github.com/QingWei-Li/docsify/commit/7f270f9))
|
||||
|
||||
<a name="4.2.7"></a>
|
||||
|
||||
@@ -451,8 +518,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
|
||||
* **style:** nowrap => pre-wrap, fixed [#228](https://github.com/QingWei-Li/docsify/issues/228) ([a88252c](https://github.com/QingWei-Li/docsify/commit/a88252c))
|
||||
- **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
|
||||
- **style:** nowrap => pre-wrap, fixed [#228](https://github.com/QingWei-Li/docsify/issues/228) ([a88252c](https://github.com/QingWei-Li/docsify/commit/a88252c))
|
||||
|
||||
<a name="4.2.6"></a>
|
||||
|
||||
@@ -460,8 +527,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **css:** hide the nav when the content has not yet been loaded ([1fa1619](https://github.com/QingWei-Li/docsify/commit/1fa1619))
|
||||
* **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
|
||||
- **css:** hide the nav when the content has not yet been loaded ([1fa1619](https://github.com/QingWei-Li/docsify/commit/1fa1619))
|
||||
- **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
|
||||
|
||||
<a name="4.2.4"></a>
|
||||
|
||||
@@ -469,7 +536,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **render:** Remove getRootNode to be compatible with the lower version of Chrome, fixed [#225](https://github.com/QingWei-Li/docsify/issues/225) ([b8dd346](https://github.com/QingWei-Li/docsify/commit/b8dd346))
|
||||
- **render:** Remove getRootNode to be compatible with the lower version of Chrome, fixed [#225](https://github.com/QingWei-Li/docsify/issues/225) ([b8dd346](https://github.com/QingWei-Li/docsify/commit/b8dd346))
|
||||
|
||||
<a name="4.2.3"></a>
|
||||
|
||||
@@ -477,7 +544,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **search:** Supports the max depth of the search headline, fixed [#223](https://github.com/QingWei-Li/docsify/issues/223), resolve [#129](https://github.com/QingWei-Li/docsify/issues/129) ([b7b589b](https://github.com/QingWei-Li/docsify/commit/b7b589b))
|
||||
- **search:** Supports the max depth of the search headline, fixed [#223](https://github.com/QingWei-Li/docsify/issues/223), resolve [#129](https://github.com/QingWei-Li/docsify/issues/129) ([b7b589b](https://github.com/QingWei-Li/docsify/commit/b7b589b))
|
||||
|
||||
<a name="4.2.2"></a>
|
||||
|
||||
@@ -485,14 +552,14 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* style rerender due to setting themeColor ([17ff3d1](https://github.com/QingWei-Li/docsify/commit/17ff3d1))
|
||||
- style rerender due to setting themeColor ([17ff3d1](https://github.com/QingWei-Li/docsify/commit/17ff3d1))
|
||||
|
||||
<a name="4.2.1"></a>
|
||||
|
||||
## [4.2.1](https://github.com/QingWei-Li/docsify/compare/v4.2.0...v4.2.1) (2017-07-19)
|
||||
|
||||
* give the navbar some line-height (#216)
|
||||
* Remove unnecessary moduleName option from rollup config for plugins (#209)
|
||||
- give the navbar some line-height (#216)
|
||||
- Remove unnecessary moduleName option from rollup config for plugins (#209)
|
||||
|
||||
<a name="4.2.0"></a>
|
||||
|
||||
@@ -500,12 +567,12 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* not found page ([9af8559](https://github.com/QingWei-Li/docsify/commit/9af8559))
|
||||
- not found page ([9af8559](https://github.com/QingWei-Li/docsify/commit/9af8559))
|
||||
|
||||
### Features
|
||||
|
||||
* alias option supports regexp, resolve [#183](https://github.com/QingWei-Li/docsify/issues/183) ([c4aa22c](https://github.com/QingWei-Li/docsify/commit/c4aa22c))
|
||||
* ignore to compiled link, fixed [#203](https://github.com/QingWei-Li/docsify/issues/203) ([#204](https://github.com/QingWei-Li/docsify/issues/204)) ([2e00f4c](https://github.com/QingWei-Li/docsify/commit/2e00f4c))
|
||||
- alias option supports regexp, resolve [#183](https://github.com/QingWei-Li/docsify/issues/183) ([c4aa22c](https://github.com/QingWei-Li/docsify/commit/c4aa22c))
|
||||
- ignore to compiled link, fixed [#203](https://github.com/QingWei-Li/docsify/issues/203) ([#204](https://github.com/QingWei-Li/docsify/issues/204)) ([2e00f4c](https://github.com/QingWei-Li/docsify/commit/2e00f4c))
|
||||
|
||||
<a name="4.1.14"></a>
|
||||
|
||||
@@ -513,11 +580,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* get file path, fixed jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070 ([e8117e5](https://github.com/QingWei-Li/docsify/commit/e8117e5)), closes [jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070](https://github.com/jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13/issues/commitcomment-22427070)
|
||||
- get file path, fixed jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070 ([e8117e5](https://github.com/QingWei-Li/docsify/commit/e8117e5)), closes [jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070](https://github.com/jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13/issues/commitcomment-22427070)
|
||||
|
||||
### Features
|
||||
|
||||
* add context attribute, fixed [#191](https://github.com/QingWei-Li/docsify/issues/191) ([ce0e9ac](https://github.com/QingWei-Li/docsify/commit/ce0e9ac))
|
||||
- add context attribute, fixed [#191](https://github.com/QingWei-Li/docsify/issues/191) ([ce0e9ac](https://github.com/QingWei-Li/docsify/commit/ce0e9ac))
|
||||
|
||||
<a name="4.1.13"></a>
|
||||
|
||||
@@ -529,7 +596,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **render:** subtitle in side bar shows undefined, fixed [#182](https://github.com/QingWei-Li/docsify/issues/182) ([d087d57](https://github.com/QingWei-Li/docsify/commit/d087d57))
|
||||
- **render:** subtitle in side bar shows undefined, fixed [#182](https://github.com/QingWei-Li/docsify/issues/182) ([d087d57](https://github.com/QingWei-Li/docsify/commit/d087d57))
|
||||
|
||||
<a name="4.1.11"></a>
|
||||
|
||||
@@ -537,8 +604,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **compiler:** force reset toc when rendering sidebar fixed [#181](https://github.com/QingWei-Li/docsify/issues/181) ([ccf4c7c](https://github.com/QingWei-Li/docsify/commit/ccf4c7c))
|
||||
* **render:** autoHeader does not work ([1304d2e](https://github.com/QingWei-Li/docsify/commit/1304d2e))
|
||||
- **compiler:** force reset toc when rendering sidebar fixed [#181](https://github.com/QingWei-Li/docsify/issues/181) ([ccf4c7c](https://github.com/QingWei-Li/docsify/commit/ccf4c7c))
|
||||
- **render:** autoHeader does not work ([1304d2e](https://github.com/QingWei-Li/docsify/commit/1304d2e))
|
||||
|
||||
<a name="4.1.10"></a>
|
||||
|
||||
@@ -546,7 +613,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **hash:** hash routing crashes when url has querystring ([6d48ce1](https://github.com/QingWei-Li/docsify/commit/6d48ce1))
|
||||
- **hash:** hash routing crashes when url has querystring ([6d48ce1](https://github.com/QingWei-Li/docsify/commit/6d48ce1))
|
||||
|
||||
<a name="4.1.9"></a>
|
||||
|
||||
@@ -554,9 +621,9 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* can't render toc on first load ([d9b487e](https://github.com/QingWei-Li/docsify/commit/d9b487e))
|
||||
* **lifecycle:** continue to handle data ([955d3d5](https://github.com/QingWei-Li/docsify/commit/955d3d5))
|
||||
* **render:** broken name link, fixed [#167](https://github.com/QingWei-Li/docsify/issues/167) ([91b66a5](https://github.com/QingWei-Li/docsify/commit/91b66a5))
|
||||
- can't render toc on first load ([d9b487e](https://github.com/QingWei-Li/docsify/commit/d9b487e))
|
||||
- **lifecycle:** continue to handle data ([955d3d5](https://github.com/QingWei-Li/docsify/commit/955d3d5))
|
||||
- **render:** broken name link, fixed [#167](https://github.com/QingWei-Li/docsify/issues/167) ([91b66a5](https://github.com/QingWei-Li/docsify/commit/91b66a5))
|
||||
|
||||
<a name="4.1.8"></a>
|
||||
|
||||
@@ -564,13 +631,13 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* auto replace version ([22b50f0](https://github.com/QingWei-Li/docsify/commit/22b50f0))
|
||||
* update edit button demo ([ec887c1](https://github.com/QingWei-Li/docsify/commit/ec887c1))
|
||||
- auto replace version ([22b50f0](https://github.com/QingWei-Li/docsify/commit/22b50f0))
|
||||
- update edit button demo ([ec887c1](https://github.com/QingWei-Li/docsify/commit/ec887c1))
|
||||
|
||||
### Features
|
||||
|
||||
* add edit button demo ([a64cee1](https://github.com/QingWei-Li/docsify/commit/a64cee1))
|
||||
* add edit button demo, close [#162](https://github.com/QingWei-Li/docsify/issues/162) ([036fdac](https://github.com/QingWei-Li/docsify/commit/036fdac))
|
||||
- add edit button demo ([a64cee1](https://github.com/QingWei-Li/docsify/commit/a64cee1))
|
||||
- add edit button demo, close [#162](https://github.com/QingWei-Li/docsify/issues/162) ([036fdac](https://github.com/QingWei-Li/docsify/commit/036fdac))
|
||||
|
||||
<a name="4.1.7"></a>
|
||||
|
||||
@@ -578,7 +645,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ssr:** clean files ([0014895](https://github.com/QingWei-Li/docsify/commit/0014895))
|
||||
- **ssr:** clean files ([0014895](https://github.com/QingWei-Li/docsify/commit/0014895))
|
||||
|
||||
<a name="4.1.6"></a>
|
||||
|
||||
@@ -586,7 +653,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ssr:** add debug ([6b9e092](https://github.com/QingWei-Li/docsify/commit/6b9e092))
|
||||
- **ssr:** add debug ([6b9e092](https://github.com/QingWei-Li/docsify/commit/6b9e092))
|
||||
|
||||
<a name="4.1.5"></a>
|
||||
|
||||
@@ -594,7 +661,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ssr:** missing package ([6db8c9e](https://github.com/QingWei-Li/docsify/commit/6db8c9e))
|
||||
- **ssr:** missing package ([6db8c9e](https://github.com/QingWei-Li/docsify/commit/6db8c9e))
|
||||
|
||||
<a name="4.1.4"></a>
|
||||
|
||||
@@ -602,7 +669,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ssr:** file path ([79a83bc](https://github.com/QingWei-Li/docsify/commit/79a83bc))
|
||||
- **ssr:** file path ([79a83bc](https://github.com/QingWei-Li/docsify/commit/79a83bc))
|
||||
|
||||
<a name="4.1.3"></a>
|
||||
|
||||
@@ -610,7 +677,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* update babel config ([9825db4](https://github.com/QingWei-Li/docsify/commit/9825db4))
|
||||
- update babel config ([9825db4](https://github.com/QingWei-Li/docsify/commit/9825db4))
|
||||
|
||||
<a name="4.1.2"></a>
|
||||
|
||||
@@ -618,7 +685,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* update babel config ([80dba19](https://github.com/QingWei-Li/docsify/commit/80dba19))
|
||||
- update babel config ([80dba19](https://github.com/QingWei-Li/docsify/commit/80dba19))
|
||||
|
||||
<a name="4.1.1"></a>
|
||||
|
||||
@@ -626,8 +693,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* build for ssr package ([4cb20a5](https://github.com/QingWei-Li/docsify/commit/4cb20a5))
|
||||
* remove history mode ([0e74e6c](https://github.com/QingWei-Li/docsify/commit/0e74e6c))
|
||||
- build for ssr package ([4cb20a5](https://github.com/QingWei-Li/docsify/commit/4cb20a5))
|
||||
- remove history mode ([0e74e6c](https://github.com/QingWei-Li/docsify/commit/0e74e6c))
|
||||
|
||||
<a name="4.1.0"></a>
|
||||
|
||||
@@ -639,7 +706,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* basePath for history mode ([fc1cd3f](https://github.com/QingWei-Li/docsify/commit/fc1cd3f))
|
||||
- basePath for history mode ([fc1cd3f](https://github.com/QingWei-Li/docsify/commit/fc1cd3f))
|
||||
|
||||
<a name="4.0.1"></a>
|
||||
|
||||
@@ -647,8 +714,8 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ssr:** remove context ([4626157](https://github.com/QingWei-Li/docsify/commit/4626157))
|
||||
* lint ([b764b6e](https://github.com/QingWei-Li/docsify/commit/b764b6e))
|
||||
- **ssr:** remove context ([4626157](https://github.com/QingWei-Li/docsify/commit/4626157))
|
||||
- lint ([b764b6e](https://github.com/QingWei-Li/docsify/commit/b764b6e))
|
||||
|
||||
<a name="4.0.0"></a>
|
||||
|
||||
@@ -656,11 +723,11 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **render:** init event in ssr ([eba1c98](https://github.com/QingWei-Li/docsify/commit/eba1c98))
|
||||
* lint ([1f4514d](https://github.com/QingWei-Li/docsify/commit/1f4514d))
|
||||
- **render:** init event in ssr ([eba1c98](https://github.com/QingWei-Li/docsify/commit/eba1c98))
|
||||
- lint ([1f4514d](https://github.com/QingWei-Li/docsify/commit/1f4514d))
|
||||
|
||||
### Features
|
||||
|
||||
* finish ssr ([3444884](https://github.com/QingWei-Li/docsify/commit/3444884))
|
||||
* init ocsify-server-renderer ([6dea685](https://github.com/QingWei-Li/docsify/commit/6dea685))
|
||||
* support history mode ([f095eb8](https://github.com/QingWei-Li/docsify/commit/f095eb8))
|
||||
- finish ssr ([3444884](https://github.com/QingWei-Li/docsify/commit/3444884))
|
||||
- init ocsify-server-renderer ([6dea685](https://github.com/QingWei-Li/docsify/commit/6dea685))
|
||||
- support history mode ([f095eb8](https://github.com/QingWei-Li/docsify/commit/f095eb8))
|
||||
|
||||
@@ -36,17 +36,19 @@
|
||||
## Features
|
||||
|
||||
- No statically built html files
|
||||
- Simple and lightweight (~19kB gzipped)
|
||||
- Simple and lightweight (~21kB gzipped)
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
- Compatible with IE10+
|
||||
- Compatible with IE11
|
||||
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
|
||||
- Support embedded files
|
||||
|
||||
## Quick start
|
||||
|
||||
Look at [this tutorial](https://docsify.js.org/#/quickstart) or [online demo](https://jsfiddle.net/7ztb8qsr/1/).
|
||||
Look at [this tutorial](https://docsify.js.org/#/quickstart)
|
||||
|
||||
[](https://codesandbox.io/s/307qqv236)
|
||||
|
||||
## Showcase
|
||||
|
||||
@@ -103,6 +105,6 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
[MIT](LICENSE)
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
|
||||
|
||||
+5
-7
@@ -8,14 +8,12 @@ const isProd = process.env.NODE_ENV === 'production'
|
||||
const version = process.env.VERSION || require('../package.json').version
|
||||
const chokidar = require('chokidar')
|
||||
const path = require('path')
|
||||
const json = require('rollup-plugin-json')
|
||||
|
||||
const build = function(opts) {
|
||||
const build = function (opts) {
|
||||
rollup
|
||||
.rollup({
|
||||
input: opts.input,
|
||||
plugins: (opts.plugins || []).concat([
|
||||
json(),
|
||||
buble(),
|
||||
commonjs(),
|
||||
nodeResolve(),
|
||||
@@ -25,7 +23,7 @@ const build = function(opts) {
|
||||
})
|
||||
])
|
||||
})
|
||||
.then(function(bundle) {
|
||||
.then(function (bundle) {
|
||||
var dest = 'lib/' + (opts.output || opts.input)
|
||||
|
||||
console.log(dest)
|
||||
@@ -35,11 +33,11 @@ const build = function(opts) {
|
||||
strict: false
|
||||
})
|
||||
})
|
||||
.catch(function(err) {
|
||||
.catch(function (err) {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
const buildCore = function() {
|
||||
const buildCore = function () {
|
||||
build({
|
||||
input: 'src/core/index.js',
|
||||
output: 'docsify.js'
|
||||
@@ -53,7 +51,7 @@ const buildCore = function() {
|
||||
})
|
||||
}
|
||||
}
|
||||
const buildAllPlugin = function() {
|
||||
const buildAllPlugin = function () {
|
||||
var plugins = [
|
||||
{name: 'search', input: 'search/index.js'},
|
||||
{name: 'ga', input: 'ga.js'},
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ See the [Quick start](quickstart.md) guide for more details.
|
||||
## Features
|
||||
|
||||
- No statically built html files
|
||||
- Simple and lightweight (~19kB gzipped)
|
||||
- Simple and lightweight (~21kB gzipped)
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||

|
||||
|
||||
# docsify <small>4.8.0</small>
|
||||
# docsify <small>4.9.1</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
* Simple and lightweight (~19kB gzipped)
|
||||
* No statically built html files
|
||||
* Multiple themes
|
||||
- Simple and lightweight (~21kB gzipped)
|
||||
- No statically built html files
|
||||
- Multiple themes
|
||||
|
||||
[GitHub](https://github.com/docsifyjs/docsify/)
|
||||
[Getting Started](#docsify)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import fetch from 'fetch'
|
||||
|
||||
const URL = 'https://example.com'
|
||||
const PORT = 8080
|
||||
|
||||
/// [demo]
|
||||
const result = fetch(`${URL}:${PORT}`)
|
||||
.then(function(response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function(myJson) {
|
||||
console.log(JSON.stringify(myJson));
|
||||
});
|
||||
/// [demo]
|
||||
|
||||
result.then(console.log).catch(console.error)
|
||||
+22
-22
@@ -1,28 +1,28 @@
|
||||
* Getting started
|
||||
- Getting started
|
||||
|
||||
* [Quick start](quickstart.md)
|
||||
* [Writing more pages](more-pages.md)
|
||||
* [Custom navbar](custom-navbar.md)
|
||||
* [Cover page](cover.md)
|
||||
- [Quick start](quickstart.md)
|
||||
- [Writing more pages](more-pages.md)
|
||||
- [Custom navbar](custom-navbar.md)
|
||||
- [Cover page](cover.md)
|
||||
|
||||
* Customization
|
||||
- Customization
|
||||
|
||||
* [Configuration](configuration.md)
|
||||
* [Themes](themes.md)
|
||||
* [List of Plugins](plugins.md)
|
||||
* [Write a Plugin](write-a-plugin.md)
|
||||
* [Markdown configuration](markdown.md)
|
||||
* [Language highlighting](language-highlight.md)
|
||||
- [Configuration](configuration.md)
|
||||
- [Themes](themes.md)
|
||||
- [List of Plugins](plugins.md)
|
||||
- [Write a Plugin](write-a-plugin.md)
|
||||
- [Markdown configuration](markdown.md)
|
||||
- [Language highlighting](language-highlight.md)
|
||||
|
||||
* Guide
|
||||
- Guide
|
||||
|
||||
* [Deploy](deploy.md)
|
||||
* [Helpers](helpers.md)
|
||||
* [Vue compatibility](vue.md)
|
||||
* [CDN](cdn.md)
|
||||
* [Offline Mode(PWA)](pwa.md)
|
||||
* [Server-Side Rendering(SSR)](ssr.md)
|
||||
* [Embed Files <sup style="color:red">(new)<sup>](embed-files.md)
|
||||
- [Deploy](deploy.md)
|
||||
- [Helpers](helpers.md)
|
||||
- [Vue compatibility](vue.md)
|
||||
- [CDN](cdn.md)
|
||||
- [Offline Mode(PWA)](pwa.md)
|
||||
- [Server-Side Rendering(SSR)](ssr.md)
|
||||
- [Embed Files](embed-files.md)
|
||||
|
||||
* [Awesome docsify](awesome.md)
|
||||
* [Changelog](changelog.md)
|
||||
- [Awesome docsify](awesome.md)
|
||||
- [Changelog](changelog.md)
|
||||
|
||||
+3
-3
@@ -26,9 +26,9 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
* Simple and lightweight (~19kB gzipped)
|
||||
* No statically built html files
|
||||
* Multiple themes
|
||||
- Simple and lightweight (~21kB gzipped)
|
||||
- No statically built html files
|
||||
- Multiple themes
|
||||
|
||||
[GitHub](https://github.com/docsifyjs/docsify/)
|
||||
[Get Started](#docsify)
|
||||
|
||||
@@ -39,6 +39,21 @@ You will get it
|
||||
|
||||
[filename](_media/example.md ':include :type=code')
|
||||
|
||||
## Embedded code fragments
|
||||
Sometimes you don't want to embed a whole file. Maybe because you need just a few lines but you want to compile and test the file in CI.
|
||||
|
||||
```markdown
|
||||
[filename](_media/example.js ':include :type=code :fragment=demo')
|
||||
```
|
||||
|
||||
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
|
||||
Alternatively you can use `### [demo]`.
|
||||
|
||||
Example:
|
||||
|
||||
[filename](_media/example.js ':include :type=code :fragment=demo')
|
||||
|
||||
|
||||
## Tag attribute
|
||||
|
||||
If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags.
|
||||
|
||||
@@ -88,9 +88,58 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
|
||||

|
||||
|
||||
<!-- Support percentage -->
|
||||
|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Customise ID for headings
|
||||
|
||||
```md
|
||||
### 你好,世界! :id=hello-world
|
||||
```
|
||||
|
||||
## Markdown in html tag
|
||||
|
||||
You need to insert a space between the html and markdown content.
|
||||
This is useful for rendering markdown content in the details element.
|
||||
|
||||
```markdown
|
||||
<details>
|
||||
<summary>Self-assessment (Click to expand)</summary>
|
||||
|
||||
- Abc
|
||||
- Abc
|
||||
|
||||
</details>
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Self-assessment (Click to expand)</summary>
|
||||
|
||||
- Abc
|
||||
- Abc
|
||||
|
||||
</details>
|
||||
|
||||
Or markdown content can be wrapped in html tag.
|
||||
|
||||
```markdown
|
||||
<div style='color: red'>
|
||||
|
||||
- listitem
|
||||
- listitem
|
||||
- listitem
|
||||
|
||||
</div>
|
||||
```
|
||||
|
||||
<div style='color: red'>
|
||||
|
||||
- Abc
|
||||
- Abc
|
||||
|
||||
</div>
|
||||
|
||||
+2
-1
@@ -36,6 +36,7 @@ window.$docsify = {
|
||||
// <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css">
|
||||
// <script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
|
||||
var num = 0;
|
||||
mermaid.initialize({ startOnLoad: false });
|
||||
|
||||
window.$docsify = {
|
||||
@@ -44,7 +45,7 @@ window.$docsify = {
|
||||
code: function(code, lang) {
|
||||
if (lang === "mermaid") {
|
||||
return (
|
||||
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
|
||||
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
|
||||
);
|
||||
}
|
||||
return this.origin.code.apply(this, arguments);
|
||||
|
||||
+10
-2
@@ -40,6 +40,10 @@ By default, the hyperlink on the current page is recognized and the content is s
|
||||
depth: 2,
|
||||
|
||||
hideOtherSidebarContent: false, // whether or not to hide other sidebar content
|
||||
|
||||
// To avoid search index collision
|
||||
// between multiple websites under the same domain
|
||||
namespace: 'website-1',
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -95,7 +99,7 @@ Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour
|
||||
Exclude the special image
|
||||
|
||||
```markdown
|
||||

|
||||

|
||||
```
|
||||
|
||||
## Edit on github
|
||||
@@ -184,6 +188,10 @@ window.$docsify = {
|
||||
|
||||
A docsify.js plugin for displaying tabbed content from markdown.
|
||||
|
||||
* [Documentation & Demos](https://jhildenbiddle.github.io/docsify-tabs)
|
||||
- [Documentation & Demos](https://jhildenbiddle.github.io/docsify-tabs)
|
||||
|
||||
Provided by [@jhildenbiddle](https://github.com/jhildenbiddle/docsify-tabs).
|
||||
|
||||
## More plugins
|
||||
|
||||
See [awesome-docsify](awesome?id=plugins)
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ var readFileSync = require('fs').readFileSync
|
||||
|
||||
// init
|
||||
var renderer = new Renderer({
|
||||
template: readFileSync('./docs/index.template.html', 'utf-8').,
|
||||
template: readFileSync('./docs/index.template.html', 'utf-8'),
|
||||
config: {
|
||||
name: 'docsify',
|
||||
repo: 'docsifyjs/docsify'
|
||||
|
||||
+64
-46
@@ -6,41 +6,41 @@ A plugin is simply a function that takes `hook` as an argument. The hook support
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
plugins: [
|
||||
function (hook, vm) {
|
||||
hook.init(function() {
|
||||
// Called when the script starts running, only trigger once, no arguments,
|
||||
})
|
||||
plugins: [
|
||||
function(hook, vm) {
|
||||
hook.init(function() {
|
||||
// Called when the script starts running, only trigger once, no arguments,
|
||||
});
|
||||
|
||||
hook.beforeEach(function(content) {
|
||||
// Invoked each time before parsing the Markdown file.
|
||||
// ...
|
||||
return content
|
||||
})
|
||||
hook.beforeEach(function(content) {
|
||||
// Invoked each time before parsing the Markdown file.
|
||||
// ...
|
||||
return content;
|
||||
});
|
||||
|
||||
hook.afterEach(function(html, next) {
|
||||
// Invoked each time after the Markdown file is parsed.
|
||||
// beforeEach and afterEach support asynchronous。
|
||||
// ...
|
||||
// call `next(html)` when task is done.
|
||||
next(html)
|
||||
})
|
||||
hook.afterEach(function(html, next) {
|
||||
// Invoked each time after the Markdown file is parsed.
|
||||
// beforeEach and afterEach support asynchronous。
|
||||
// ...
|
||||
// call `next(html)` when task is done.
|
||||
next(html);
|
||||
});
|
||||
|
||||
hook.doneEach(function() {
|
||||
// Invoked each time after the data is fully loaded, no arguments,
|
||||
// ...
|
||||
})
|
||||
hook.doneEach(function() {
|
||||
// Invoked each time after the data is fully loaded, no arguments,
|
||||
// ...
|
||||
});
|
||||
|
||||
hook.mounted(function() {
|
||||
// Called after initial completion. Only trigger once, no arguments.
|
||||
})
|
||||
hook.mounted(function() {
|
||||
// Called after initial completion. Only trigger once, no arguments.
|
||||
});
|
||||
|
||||
hook.ready(function() {
|
||||
// Called after initial completion, no arguments.
|
||||
})
|
||||
}
|
||||
]
|
||||
}
|
||||
hook.ready(function() {
|
||||
// Called after initial completion, no arguments.
|
||||
});
|
||||
}
|
||||
]
|
||||
};
|
||||
```
|
||||
|
||||
!> You can get internal methods through `window.Docsify`. Get the current instance through the second argument.
|
||||
@@ -54,21 +54,21 @@ Add footer component in each pages.
|
||||
```js
|
||||
window.$docsify = {
|
||||
plugins: [
|
||||
function (hook) {
|
||||
function(hook) {
|
||||
var footer = [
|
||||
'<hr/>',
|
||||
'<footer>',
|
||||
'<span><a href="https://github.com/QingWei-Li">cinwell</a> ©2017.</span>',
|
||||
'<span>Proudly published with <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>',
|
||||
'</footer>'
|
||||
].join('')
|
||||
].join('');
|
||||
|
||||
hook.afterEach(function (html) {
|
||||
return html + footer
|
||||
})
|
||||
hook.afterEach(function(html) {
|
||||
return html + footer;
|
||||
});
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### Edit Button
|
||||
@@ -77,17 +77,35 @@ window.$docsify = {
|
||||
window.$docsify = {
|
||||
plugins: [
|
||||
function(hook, vm) {
|
||||
hook.beforeEach(function (html) {
|
||||
var url = 'https://github.com/docsifyjs/docsify/blob/master/docs' + vm.route.file
|
||||
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
|
||||
hook.beforeEach(function(html) {
|
||||
var url =
|
||||
'https://github.com/docsifyjs/docsify/blob/master/docs' +
|
||||
vm.route.file;
|
||||
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n';
|
||||
|
||||
return editHtml
|
||||
+ html
|
||||
+ '\n----\n'
|
||||
+ 'Last modified {docsify-updated} '
|
||||
+ editHtml
|
||||
})
|
||||
return (
|
||||
editHtml +
|
||||
html +
|
||||
'\n----\n' +
|
||||
'Last modified {docsify-updated} ' +
|
||||
editHtml
|
||||
);
|
||||
});
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
### Get docsify version
|
||||
|
||||
```
|
||||
console.log(window.Docsify.version)
|
||||
```
|
||||
|
||||
Current version: <span id='tip-version'>loading</span>
|
||||
|
||||
<script>
|
||||
document.getElementById('tip-version').innerText = Docsify.version
|
||||
</script>
|
||||
|
||||
+163
-34
@@ -60,8 +60,6 @@ function isFn(obj) {
|
||||
return typeof obj === 'function'
|
||||
}
|
||||
|
||||
var version = "4.7.1";
|
||||
|
||||
function config () {
|
||||
var config = merge(
|
||||
{
|
||||
@@ -126,7 +124,6 @@ function config () {
|
||||
}
|
||||
}
|
||||
|
||||
config.version = version;
|
||||
window.$docsify = config;
|
||||
|
||||
return config
|
||||
@@ -337,7 +334,7 @@ function corner(data) {
|
||||
/**
|
||||
* Render main content
|
||||
*/
|
||||
function main$1(config) {
|
||||
function main(config) {
|
||||
var aside =
|
||||
'<button class="sidebar-toggle">' +
|
||||
'<div class="sidebar-toggle-button">' +
|
||||
@@ -3160,7 +3157,7 @@ slugify.clear = function () {
|
||||
};
|
||||
|
||||
function replace(m, $1) {
|
||||
return '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/' + $1 + '.png" alt="' + $1 + '" />'
|
||||
return '<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' + $1 + '.png" alt="' + $1 + '" />'
|
||||
}
|
||||
|
||||
function emojify(text) {
|
||||
@@ -3236,6 +3233,97 @@ var replaceSlug = cached(function (path) {
|
||||
return path.replace('#', '?id=')
|
||||
});
|
||||
|
||||
Prism.languages['markup-templating'] = {};
|
||||
|
||||
Object.defineProperties(Prism.languages['markup-templating'], {
|
||||
buildPlaceholders: {
|
||||
// Tokenize all inline templating expressions matching placeholderPattern
|
||||
// If the replaceFilter function is provided, it will be called with every match.
|
||||
// If it returns false, the match will not be replaced.
|
||||
value: function (env, language, placeholderPattern, replaceFilter) {
|
||||
if (env.language !== language) {
|
||||
return;
|
||||
}
|
||||
|
||||
env.tokenStack = [];
|
||||
|
||||
env.code = env.code.replace(placeholderPattern, function(match) {
|
||||
if (typeof replaceFilter === 'function' && !replaceFilter(match)) {
|
||||
return match;
|
||||
}
|
||||
var i = env.tokenStack.length;
|
||||
// Check for existing strings
|
||||
while (env.code.indexOf('___' + language.toUpperCase() + i + '___') !== -1)
|
||||
{ ++i; }
|
||||
|
||||
// Create a sparse array
|
||||
env.tokenStack[i] = match;
|
||||
|
||||
return '___' + language.toUpperCase() + i + '___';
|
||||
});
|
||||
|
||||
// Switch the grammar to markup
|
||||
env.grammar = Prism.languages.markup;
|
||||
}
|
||||
},
|
||||
tokenizePlaceholders: {
|
||||
// Replace placeholders with proper tokens after tokenizing
|
||||
value: function (env, language) {
|
||||
if (env.language !== language || !env.tokenStack) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Switch the grammar back
|
||||
env.grammar = Prism.languages[language];
|
||||
|
||||
var j = 0;
|
||||
var keys = Object.keys(env.tokenStack);
|
||||
var walkTokens = function (tokens) {
|
||||
if (j >= keys.length) {
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i];
|
||||
if (typeof token === 'string' || (token.content && typeof token.content === 'string')) {
|
||||
var k = keys[j];
|
||||
var t = env.tokenStack[k];
|
||||
var s = typeof token === 'string' ? token : token.content;
|
||||
|
||||
var index = s.indexOf('___' + language.toUpperCase() + k + '___');
|
||||
if (index > -1) {
|
||||
++j;
|
||||
var before = s.substring(0, index);
|
||||
var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar, language), 'language-' + language, t);
|
||||
var after = s.substring(index + ('___' + language.toUpperCase() + k + '___').length);
|
||||
var replacement;
|
||||
if (before || after) {
|
||||
replacement = [before, middle, after].filter(function (v) { return !!v; });
|
||||
walkTokens(replacement);
|
||||
} else {
|
||||
replacement = middle;
|
||||
}
|
||||
if (typeof token === 'string') {
|
||||
Array.prototype.splice.apply(tokens, [i, 1].concat(replacement));
|
||||
} else {
|
||||
token.content = replacement;
|
||||
}
|
||||
|
||||
if (j >= keys.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (token.content && typeof token.content !== 'string') {
|
||||
walkTokens(token.content);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
walkTokens(env.tokens);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// See https://github.com/PrismJS/prism/pull/1367
|
||||
var cachedLinks = {};
|
||||
|
||||
function getAndRemoveConfig(str) {
|
||||
@@ -3245,8 +3333,9 @@ function getAndRemoveConfig(str) {
|
||||
|
||||
if (str) {
|
||||
str = str
|
||||
.replace(/^'|'$/, '')
|
||||
.replace(/:([\w-]+)=?([\w-]+)?/g, function (m, key, value) {
|
||||
.replace(/^'/, '')
|
||||
.replace(/'$/, '')
|
||||
.replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g, function (m, key, value) {
|
||||
config[key] = (value && value.replace(/"/g, '')) || true;
|
||||
return ''
|
||||
})
|
||||
@@ -3394,6 +3483,7 @@ Compiler.prototype.compileEmbed = function compileEmbed (href, title) {
|
||||
embed = compileMedia[type].call(this, href, title);
|
||||
embed.type = type;
|
||||
}
|
||||
embed.fragment = config.fragment;
|
||||
|
||||
return embed
|
||||
}
|
||||
@@ -3426,26 +3516,29 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
* @link https://github.com/markedjs/marked#overriding-renderer-methods
|
||||
*/
|
||||
origin.heading = renderer.heading = function (text, level) {
|
||||
var nextToc = {level: level, title: text};
|
||||
var ref = getAndRemoveConfig(text);
|
||||
var str = ref.str;
|
||||
var config = ref.config;
|
||||
var nextToc = {level: level, title: str};
|
||||
|
||||
if (/{docsify-ignore}/g.test(text)) {
|
||||
text = text.replace('{docsify-ignore}', '');
|
||||
nextToc.title = text;
|
||||
if (/{docsify-ignore}/g.test(str)) {
|
||||
str = str.replace('{docsify-ignore}', '');
|
||||
nextToc.title = str;
|
||||
nextToc.ignoreSubHeading = true;
|
||||
}
|
||||
|
||||
if (/{docsify-ignore-all}/g.test(text)) {
|
||||
text = text.replace('{docsify-ignore-all}', '');
|
||||
nextToc.title = text;
|
||||
if (/{docsify-ignore-all}/g.test(str)) {
|
||||
str = str.replace('{docsify-ignore-all}', '');
|
||||
nextToc.title = str;
|
||||
nextToc.ignoreAllSubs = true;
|
||||
}
|
||||
|
||||
var slug = slugify(text);
|
||||
var slug = slugify(config.id || str);
|
||||
var url = router.toURL(router.getCurrentPath(), {id: slug});
|
||||
nextToc.slug = url;
|
||||
_self.toc.push(nextToc);
|
||||
|
||||
return ("<h" + level + " id=\"" + slug + "\"><a href=\"" + url + "\" data-id=\"" + slug + "\" class=\"anchor\"><span>" + text + "</span></a></h" + level + ">")
|
||||
return ("<h" + level + " id=\"" + slug + "\"><a href=\"" + url + "\" data-id=\"" + slug + "\" class=\"anchor\"><span>" + str + "</span></a></h" + level + ">")
|
||||
};
|
||||
// Highlight code
|
||||
origin.code = renderer.code = function (code, lang) {
|
||||
@@ -3479,7 +3572,7 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
}
|
||||
href = router.toURL(href, null, router.getCurrentPath());
|
||||
} else {
|
||||
attrs += href.startsWith('mailto:') ? '' : (" target=\"" + linkTarget + "\"");
|
||||
attrs += href.indexOf('mailto:') === 0 ? '' : (" target=\"" + linkTarget + "\"");
|
||||
}
|
||||
|
||||
if (config.target) {
|
||||
@@ -3541,6 +3634,23 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
|
||||
return ("<img src=\"" + url + "\"data-origin=\"" + href + "\" alt=\"" + text + "\"" + attrs + ">")
|
||||
};
|
||||
origin.list = renderer.list = function (body, ordered, start) {
|
||||
var isTaskList = /<li class="task-list-item">/.test(body.split('class="task-list"')[0]);
|
||||
var isStartReq = start && start > 1;
|
||||
var tag = ordered ? 'ol' : 'ul';
|
||||
var tagAttrs = [
|
||||
(isTaskList ? 'class="task-list"' : ''),
|
||||
(isStartReq ? ("start=\"" + start + "\"") : '')
|
||||
].join(' ').trim();
|
||||
|
||||
return ("<" + tag + " " + tagAttrs + ">" + body + "</" + tag + ">")
|
||||
};
|
||||
origin.listitem = renderer.listitem = function (text) {
|
||||
var isTaskItem = /^(<input.*type="checkbox"[^>]*>)/.test(text);
|
||||
var html = isTaskItem ? ("<li class=\"task-list-item\"><label>" + text + "</label></li>") : ("<li>" + text + "</li>");
|
||||
|
||||
return html
|
||||
};
|
||||
|
||||
renderer.origin = origin;
|
||||
|
||||
@@ -3616,6 +3726,9 @@ function btn(el) {
|
||||
var toggle = function (_) { return body.classList.toggle('close'); };
|
||||
|
||||
el = getNode(el);
|
||||
if (el == null) {
|
||||
return
|
||||
}
|
||||
on(el, 'click', function (e) {
|
||||
e.stopPropagation();
|
||||
toggle();
|
||||
@@ -3631,7 +3744,9 @@ function btn(el) {
|
||||
|
||||
function collapse(el) {
|
||||
el = getNode(el);
|
||||
|
||||
if (el == null) {
|
||||
return
|
||||
}
|
||||
on(el, 'click', function (ref) {
|
||||
var target = ref.target;
|
||||
|
||||
@@ -3669,8 +3784,10 @@ function sticky() {
|
||||
*/
|
||||
function getAndActive(router, el, isParent, autoTitle) {
|
||||
el = getNode(el);
|
||||
|
||||
var links = findAll(el, 'a');
|
||||
var links = [];
|
||||
if (el != null) {
|
||||
links = findAll(el, 'a');
|
||||
}
|
||||
var hash = decodeURI(router.toURL(router.getCurrentPath()));
|
||||
var target;
|
||||
|
||||
@@ -3873,7 +3990,10 @@ function scrollActiveSidebar(router) {
|
||||
coverHeight = cover ? cover.offsetHeight : 0;
|
||||
|
||||
var sidebar = getNode('.sidebar');
|
||||
var lis = findAll(sidebar, 'li');
|
||||
var lis = [];
|
||||
if (sidebar != null) {
|
||||
lis = findAll(sidebar, 'li');
|
||||
}
|
||||
|
||||
for (var i = 0, len = lis.length; i < len; i += 1) {
|
||||
var li = lis[i];
|
||||
@@ -3957,6 +4077,11 @@ function walkFetchEmbed(ref, cb) {
|
||||
if (token.embed.type === 'markdown') {
|
||||
embedToken = compile.lexer(text);
|
||||
} else if (token.embed.type === 'code') {
|
||||
if (token.embed.fragment) {
|
||||
var fragment = token.embed.fragment;
|
||||
var pattern = new RegExp(("(?:###|\\/\\/\\/)\\s*\\[" + fragment + "\\]([\\s\\S]*)(?:###|\\/\\/\\/)\\s*\\[" + fragment + "\\]"));
|
||||
text = ((text.match(pattern) || [])[1] || '').trim();
|
||||
}
|
||||
embedToken = compile.lexer(
|
||||
'```' +
|
||||
token.embed.lang +
|
||||
@@ -3996,9 +4121,11 @@ function prerenderEmbed(ref, done) {
|
||||
var raw = ref.raw; if ( raw === void 0 ) raw = '';
|
||||
var fetch = ref.fetch;
|
||||
|
||||
var hit;
|
||||
if ((hit = cached$1[raw])) {
|
||||
return done(hit)
|
||||
var hit = cached$1[raw];
|
||||
if (hit) {
|
||||
var copy = hit.slice();
|
||||
copy.links = hit.links;
|
||||
return done(copy)
|
||||
}
|
||||
|
||||
var compile = compiler._marked;
|
||||
@@ -4154,12 +4281,12 @@ function renderMixin(proto) {
|
||||
scrollActiveSidebar(this.router);
|
||||
|
||||
if (autoHeader && activeEl) {
|
||||
var main = getNode('#main');
|
||||
var firstNode = main.children[0];
|
||||
var main$$1 = getNode('#main');
|
||||
var firstNode = main$$1.children[0];
|
||||
if (firstNode && firstNode.tagName !== 'H1') {
|
||||
var h1 = create('h1');
|
||||
h1.innerText = activeEl.innerText;
|
||||
before(main, h1);
|
||||
before(main$$1, h1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4221,6 +4348,7 @@ function renderMixin(proto) {
|
||||
toggleClass(el, 'add', 'show');
|
||||
|
||||
var html = this.coverIsHTML ? text : this.compiler.cover(text);
|
||||
|
||||
var m = html
|
||||
.trim()
|
||||
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$');
|
||||
@@ -4286,7 +4414,7 @@ function initRender(vm) {
|
||||
}
|
||||
}
|
||||
|
||||
html += main$1(config);
|
||||
html += main(config);
|
||||
// Render main app
|
||||
vm._renderTo(el, html, true);
|
||||
} else {
|
||||
@@ -4913,7 +5041,13 @@ var util = Object.freeze({
|
||||
});
|
||||
|
||||
function initGlobalAPI () {
|
||||
window.Docsify = {util: util, dom: dom, get: get, slugify: slugify};
|
||||
window.Docsify = {
|
||||
util: util,
|
||||
dom: dom,
|
||||
get: get,
|
||||
slugify: slugify,
|
||||
version: '4.9.1'
|
||||
};
|
||||
window.DocsifyCompiler = Compiler;
|
||||
window.marked = marked;
|
||||
window.Prism = prism;
|
||||
@@ -4949,11 +5083,6 @@ eventMixin(proto);
|
||||
*/
|
||||
initGlobalAPI();
|
||||
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.8.0';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
*/
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -893,7 +893,7 @@ var AllGithubEmoji = [
|
||||
window.emojify = function (match, $1) {
|
||||
return AllGithubEmoji.indexOf($1) === -1 ?
|
||||
match :
|
||||
'<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/' +
|
||||
'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' +
|
||||
$1 +
|
||||
'.png" alt="' +
|
||||
$1 +
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+26
-8
@@ -1,6 +1,18 @@
|
||||
(function () {
|
||||
var INDEXS = {};
|
||||
|
||||
var LOCAL_STORAGE = {
|
||||
EXPIRE_KEY: 'docsify.search.expires',
|
||||
INDEX_KEY: 'docsify.search.index'
|
||||
};
|
||||
|
||||
function resolveExpireKey(namespace) {
|
||||
return namespace ? ((LOCAL_STORAGE.EXPIRE_KEY) + "/" + namespace) : LOCAL_STORAGE.EXPIRE_KEY
|
||||
}
|
||||
function resolveIndexKey(namespace) {
|
||||
return namespace ? ((LOCAL_STORAGE.INDEX_KEY) + "/" + namespace) : LOCAL_STORAGE.INDEX_KEY
|
||||
}
|
||||
|
||||
function escapeHtml(string) {
|
||||
var entityMap = {
|
||||
'&': '&',
|
||||
@@ -17,7 +29,7 @@ function escapeHtml(string) {
|
||||
function getAllPaths(router) {
|
||||
var paths = [];
|
||||
|
||||
document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(function (node) {
|
||||
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(function (node) {
|
||||
var href = node.href;
|
||||
var originHref = node.getAttribute('href');
|
||||
var path = router.parse(href).path;
|
||||
@@ -34,9 +46,9 @@ function getAllPaths(router) {
|
||||
return paths
|
||||
}
|
||||
|
||||
function saveData(maxAge) {
|
||||
localStorage.setItem('docsify.search.expires', Date.now() + maxAge);
|
||||
localStorage.setItem('docsify.search.index', JSON.stringify(INDEXS));
|
||||
function saveData(maxAge, expireKey, indexKey) {
|
||||
localStorage.setItem(expireKey, Date.now() + maxAge);
|
||||
localStorage.setItem(indexKey, JSON.stringify(INDEXS));
|
||||
}
|
||||
|
||||
function genIndex(path, content, router, depth) {
|
||||
@@ -154,9 +166,13 @@ function search(query) {
|
||||
|
||||
function init$1(config, vm) {
|
||||
var isAuto = config.paths === 'auto';
|
||||
var isExpired = localStorage.getItem('docsify.search.expires') < Date.now();
|
||||
|
||||
INDEXS = JSON.parse(localStorage.getItem('docsify.search.index'));
|
||||
var expireKey = resolveExpireKey(config.namespace);
|
||||
var indexKey = resolveIndexKey(config.namespace);
|
||||
|
||||
var isExpired = localStorage.getItem(expireKey) < Date.now();
|
||||
|
||||
INDEXS = JSON.parse(localStorage.getItem(indexKey));
|
||||
|
||||
if (isExpired) {
|
||||
INDEXS = {};
|
||||
@@ -177,7 +193,7 @@ function init$1(config, vm) {
|
||||
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
|
||||
.then(function (result) {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth);
|
||||
len === ++count && saveData(config.maxAge);
|
||||
len === ++count && saveData(config.maxAge, expireKey, indexKey);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -311,7 +327,8 @@ var CONFIG = {
|
||||
paths: 'auto',
|
||||
depth: 2,
|
||||
maxAge: 86400000, // 1 day
|
||||
hideOtherSidebarContent: false
|
||||
hideOtherSidebarContent: false,
|
||||
namespace: undefined
|
||||
};
|
||||
|
||||
var install = function (hook, vm) {
|
||||
@@ -327,6 +344,7 @@ var install = function (hook, vm) {
|
||||
CONFIG.noData = opts.noData || CONFIG.noData;
|
||||
CONFIG.depth = opts.depth || CONFIG.depth;
|
||||
CONFIG.hideOtherSidebarContent = opts.hideOtherSidebarContent || CONFIG.hideOtherSidebarContent;
|
||||
CONFIG.namespace = opts.namespace || CONFIG.namespace;
|
||||
}
|
||||
|
||||
var isAuto = CONFIG.paths === 'auto';
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Generated
+903
-377
File diff suppressed because it is too large
Load Diff
+11
-7
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify",
|
||||
"version": "4.8.0",
|
||||
"version": "4.9.1",
|
||||
"description": "A magical documentation generator.",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
@@ -27,7 +27,7 @@
|
||||
"dev": "run-p serve watch:*",
|
||||
"dev:ssr": "run-p serve:ssr watch:*",
|
||||
"lint": "eslint {src,packages} --fix",
|
||||
"test": "run-p lint",
|
||||
"test": "mocha",
|
||||
"css": "stylus src/themes/*.styl -u autoprefixer-stylus",
|
||||
"watch:css": "run-p 'css -- -o themes -w'",
|
||||
"watch:js": "node build/build.js",
|
||||
@@ -45,31 +45,35 @@
|
||||
"marked": "^0.5.1",
|
||||
"medium-zoom": "^0.4.0",
|
||||
"opencollective": "^1.0.3",
|
||||
"prismjs": "^1.9.0",
|
||||
"prismjs": "^1.15.0",
|
||||
"tinydate": "^1.0.0",
|
||||
"tweezer.js": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer-stylus": "^0.14.0",
|
||||
"chai": "^4.2.0",
|
||||
"chokidar": "^2.0.2",
|
||||
"conventional-changelog-cli": "^1.3.5",
|
||||
"cross-env": "^5.1.3",
|
||||
"cssnano": "^3.10.0",
|
||||
"eslint": "^4.14.0",
|
||||
"eslint-config-xo-space": "^0.18.0",
|
||||
"esm": "^3.1.4",
|
||||
"jsdom": "^13.2.0",
|
||||
"lerna": "^2.5.1",
|
||||
"live-server": "^1.2.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"live-server": "^1.2.1",
|
||||
"mocha": "^5.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"rimraf": "^2.6.2",
|
||||
"rollup": "^0.53.3",
|
||||
"rollup-plugin-async": "^1.2.0",
|
||||
"rollup-plugin-buble": "^0.18.0",
|
||||
"rollup-plugin-commonjs": "^8.2.6",
|
||||
"rollup-plugin-json": "^3.1.0",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-plugin-replace": "^2.0.0",
|
||||
"rollup-plugin-uglify": "^2.0.1",
|
||||
"stylus": "^0.54.5"
|
||||
"stylus": "^0.54.5",
|
||||
"xhr2": "^0.1.4"
|
||||
},
|
||||
"keywords": [
|
||||
"doc",
|
||||
|
||||
+1
-1
@@ -37,5 +37,5 @@
|
||||
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
|
||||
}
|
||||
},
|
||||
"version": "4.8.0"
|
||||
"version": "4.9.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.8.0",
|
||||
"version": "4.9.1",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
@@ -16,6 +16,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": "^2.6.8",
|
||||
"docsify": "^4.8.0",
|
||||
"node-fetch": "^1.7.0",
|
||||
"resolve-pathname": "^2.1.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {merge, hyphenate, isPrimitive, hasOwn} from './util/core'
|
||||
import {version as pkgVersion} from './../../package.json'
|
||||
|
||||
export default function () {
|
||||
const config = merge(
|
||||
@@ -65,7 +64,6 @@ export default function () {
|
||||
}
|
||||
}
|
||||
|
||||
config.version = pkgVersion
|
||||
window.$docsify = config
|
||||
|
||||
return config
|
||||
|
||||
@@ -87,7 +87,10 @@ export function scrollActiveSidebar(router) {
|
||||
coverHeight = cover ? cover.offsetHeight : 0
|
||||
|
||||
const sidebar = dom.getNode('.sidebar')
|
||||
const lis = dom.findAll(sidebar, 'li')
|
||||
let lis = []
|
||||
if (sidebar != null) {
|
||||
lis = dom.findAll(sidebar, 'li')
|
||||
}
|
||||
|
||||
for (let i = 0, len = lis.length; i < len; i += 1) {
|
||||
const li = lis[i]
|
||||
|
||||
@@ -9,6 +9,9 @@ export function btn(el) {
|
||||
const toggle = _ => dom.body.classList.toggle('close')
|
||||
|
||||
el = dom.getNode(el)
|
||||
if (el == null) {
|
||||
return
|
||||
}
|
||||
dom.on(el, 'click', e => {
|
||||
e.stopPropagation()
|
||||
toggle()
|
||||
@@ -24,7 +27,9 @@ export function btn(el) {
|
||||
|
||||
export function collapse(el) {
|
||||
el = dom.getNode(el)
|
||||
|
||||
if (el == null) {
|
||||
return
|
||||
}
|
||||
dom.on(el, 'click', ({target}) => {
|
||||
if (
|
||||
target.nodeName === 'A' &&
|
||||
@@ -60,8 +65,10 @@ export function sticky() {
|
||||
*/
|
||||
export function getAndActive(router, el, isParent, autoTitle) {
|
||||
el = dom.getNode(el)
|
||||
|
||||
const links = dom.findAll(el, 'a')
|
||||
let links = []
|
||||
if (el != null) {
|
||||
links = dom.findAll(el, 'a')
|
||||
}
|
||||
const hash = decodeURI(router.toURL(router.getCurrentPath()))
|
||||
let target
|
||||
|
||||
|
||||
@@ -7,7 +7,13 @@ import marked from 'marked'
|
||||
import prism from 'prismjs'
|
||||
|
||||
export default function () {
|
||||
window.Docsify = {util, dom, get, slugify}
|
||||
window.Docsify = {
|
||||
util,
|
||||
dom,
|
||||
get,
|
||||
slugify,
|
||||
version: '__VERSION__'
|
||||
}
|
||||
window.DocsifyCompiler = Compiler
|
||||
window.marked = marked
|
||||
window.Prism = prism
|
||||
|
||||
@@ -35,11 +35,6 @@ eventMixin(proto)
|
||||
*/
|
||||
initGlobalAPI()
|
||||
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '__VERSION__'
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
*/
|
||||
|
||||
+35
-12
@@ -7,6 +7,9 @@ import {emojify} from './emojify'
|
||||
import {isAbsolutePath, getPath, getParentPath} from '../router/util'
|
||||
import {isFn, merge, cached, isPrimitive} from '../util/core'
|
||||
|
||||
// See https://github.com/PrismJS/prism/pull/1367
|
||||
import 'prismjs/components/prism-markup-templating'
|
||||
|
||||
const cachedLinks = {}
|
||||
|
||||
export function getAndRemoveConfig(str = '') {
|
||||
@@ -14,8 +17,9 @@ export function getAndRemoveConfig(str = '') {
|
||||
|
||||
if (str) {
|
||||
str = str
|
||||
.replace(/^'|'$/, '')
|
||||
.replace(/:([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
|
||||
.replace(/^'/, '')
|
||||
.replace(/'$/, '')
|
||||
.replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
|
||||
config[key] = (value && value.replace(/"/g, '')) || true
|
||||
return ''
|
||||
})
|
||||
@@ -160,6 +164,7 @@ export class Compiler {
|
||||
embed = compileMedia[type].call(this, href, title)
|
||||
embed.type = type
|
||||
}
|
||||
embed.fragment = config.fragment
|
||||
|
||||
return embed
|
||||
}
|
||||
@@ -189,26 +194,27 @@ export class Compiler {
|
||||
* @link https://github.com/markedjs/marked#overriding-renderer-methods
|
||||
*/
|
||||
origin.heading = renderer.heading = function (text, level) {
|
||||
const nextToc = {level, title: text}
|
||||
let {str, config} = getAndRemoveConfig(text)
|
||||
const nextToc = {level, title: str}
|
||||
|
||||
if (/{docsify-ignore}/g.test(text)) {
|
||||
text = text.replace('{docsify-ignore}', '')
|
||||
nextToc.title = text
|
||||
if (/{docsify-ignore}/g.test(str)) {
|
||||
str = str.replace('{docsify-ignore}', '')
|
||||
nextToc.title = str
|
||||
nextToc.ignoreSubHeading = true
|
||||
}
|
||||
|
||||
if (/{docsify-ignore-all}/g.test(text)) {
|
||||
text = text.replace('{docsify-ignore-all}', '')
|
||||
nextToc.title = text
|
||||
if (/{docsify-ignore-all}/g.test(str)) {
|
||||
str = str.replace('{docsify-ignore-all}', '')
|
||||
nextToc.title = str
|
||||
nextToc.ignoreAllSubs = true
|
||||
}
|
||||
|
||||
const slug = slugify(text)
|
||||
const slug = slugify(config.id || str)
|
||||
const url = router.toURL(router.getCurrentPath(), {id: slug})
|
||||
nextToc.slug = url
|
||||
_self.toc.push(nextToc)
|
||||
|
||||
return `<h${level} id="${slug}"><a href="${url}" data-id="${slug}" class="anchor"><span>${text}</span></a></h${level}>`
|
||||
return `<h${level} id="${slug}"><a href="${url}" data-id="${slug}" class="anchor"><span>${str}</span></a></h${level}>`
|
||||
}
|
||||
// Highlight code
|
||||
origin.code = renderer.code = function (code, lang = '') {
|
||||
@@ -236,7 +242,7 @@ export class Compiler {
|
||||
}
|
||||
href = router.toURL(href, null, router.getCurrentPath())
|
||||
} else {
|
||||
attrs += href.startsWith('mailto:') ? '' : ` target="${linkTarget}"`
|
||||
attrs += href.indexOf('mailto:') === 0 ? '' : ` target="${linkTarget}"`
|
||||
}
|
||||
|
||||
if (config.target) {
|
||||
@@ -296,6 +302,23 @@ export class Compiler {
|
||||
|
||||
return `<img src="${url}"data-origin="${href}" alt="${text}"${attrs}>`
|
||||
}
|
||||
origin.list = renderer.list = function (body, ordered, start) {
|
||||
const isTaskList = /<li class="task-list-item">/.test(body.split('class="task-list"')[0])
|
||||
const isStartReq = start && start > 1
|
||||
const tag = ordered ? 'ol' : 'ul'
|
||||
const tagAttrs = [
|
||||
(isTaskList ? 'class="task-list"' : ''),
|
||||
(isStartReq ? `start="${start}"` : '')
|
||||
].join(' ').trim()
|
||||
|
||||
return `<${tag} ${tagAttrs}>${body}</${tag}>`
|
||||
}
|
||||
origin.listitem = renderer.listitem = function (text) {
|
||||
const isTaskItem = /^(<input.*type="checkbox"[^>]*>)/.test(text)
|
||||
const html = isTaskItem ? `<li class="task-list-item"><label>${text}</label></li>` : `<li>${text}</li>`
|
||||
|
||||
return html
|
||||
}
|
||||
|
||||
renderer.origin = origin
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ function walkFetchEmbed({embedTokens, compile, fetch}, cb) {
|
||||
if (token.embed.type === 'markdown') {
|
||||
embedToken = compile.lexer(text)
|
||||
} else if (token.embed.type === 'code') {
|
||||
if (token.embed.fragment) {
|
||||
const fragment = token.embed.fragment
|
||||
const pattern = new RegExp(`(?:###|\\/\\/\\/)\\s*\\[${fragment}\\]([\\s\\S]*)(?:###|\\/\\/\\/)\\s*\\[${fragment}\\]`)
|
||||
text = ((text.match(pattern) || [])[1] || '').trim()
|
||||
}
|
||||
embedToken = compile.lexer(
|
||||
'```' +
|
||||
token.embed.lang +
|
||||
@@ -33,7 +38,7 @@ function walkFetchEmbed({embedTokens, compile, fetch}, cb) {
|
||||
]
|
||||
embedToken.links = {}
|
||||
} else {
|
||||
embedToken = [{type: 'html', text: text}]
|
||||
embedToken = [{type: 'html', text}]
|
||||
embedToken.links = {}
|
||||
}
|
||||
}
|
||||
@@ -57,9 +62,11 @@ function walkFetchEmbed({embedTokens, compile, fetch}, cb) {
|
||||
}
|
||||
|
||||
export function prerenderEmbed({compiler, raw = '', fetch}, done) {
|
||||
let hit
|
||||
if ((hit = cached[raw])) {
|
||||
return done(hit)
|
||||
let hit = cached[raw]
|
||||
if (hit) {
|
||||
const copy = hit.slice()
|
||||
copy.links = hit.links
|
||||
return done(copy)
|
||||
}
|
||||
|
||||
const compile = compiler._marked
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {inBrowser} from '../util/env'
|
||||
|
||||
function replace(m, $1) {
|
||||
return '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/' + $1 + '.png" alt="' + $1 + '" />'
|
||||
return '<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' + $1 + '.png" alt="' + $1 + '" />'
|
||||
}
|
||||
|
||||
export function emojify(text) {
|
||||
|
||||
@@ -176,6 +176,7 @@ export function renderMixin(proto) {
|
||||
dom.toggleClass(el, 'add', 'show')
|
||||
|
||||
let html = this.coverIsHTML ? text : this.compiler.cover(text)
|
||||
|
||||
const m = html
|
||||
.trim()
|
||||
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$')
|
||||
|
||||
@@ -892,7 +892,7 @@ const AllGithubEmoji = [
|
||||
window.emojify = function (match, $1) {
|
||||
return AllGithubEmoji.indexOf($1) === -1 ?
|
||||
match :
|
||||
'<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/' +
|
||||
'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' +
|
||||
$1 +
|
||||
'.png" alt="' +
|
||||
$1 +
|
||||
|
||||
@@ -7,7 +7,8 @@ const CONFIG = {
|
||||
paths: 'auto',
|
||||
depth: 2,
|
||||
maxAge: 86400000, // 1 day
|
||||
hideOtherSidebarContent: false
|
||||
hideOtherSidebarContent: false,
|
||||
namespace: undefined
|
||||
}
|
||||
|
||||
const install = function (hook, vm) {
|
||||
@@ -23,6 +24,7 @@ const install = function (hook, vm) {
|
||||
CONFIG.noData = opts.noData || CONFIG.noData
|
||||
CONFIG.depth = opts.depth || CONFIG.depth
|
||||
CONFIG.hideOtherSidebarContent = opts.hideOtherSidebarContent || CONFIG.hideOtherSidebarContent
|
||||
CONFIG.namespace = opts.namespace || CONFIG.namespace
|
||||
}
|
||||
|
||||
const isAuto = CONFIG.paths === 'auto'
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
let INDEXS = {}
|
||||
|
||||
const LOCAL_STORAGE = {
|
||||
EXPIRE_KEY: 'docsify.search.expires',
|
||||
INDEX_KEY: 'docsify.search.index'
|
||||
}
|
||||
|
||||
function resolveExpireKey(namespace) {
|
||||
return namespace ? `${LOCAL_STORAGE.EXPIRE_KEY}/${namespace}` : LOCAL_STORAGE.EXPIRE_KEY
|
||||
}
|
||||
function resolveIndexKey(namespace) {
|
||||
return namespace ? `${LOCAL_STORAGE.INDEX_KEY}/${namespace}` : LOCAL_STORAGE.INDEX_KEY
|
||||
}
|
||||
|
||||
function escapeHtml(string) {
|
||||
const entityMap = {
|
||||
'&': '&',
|
||||
@@ -16,7 +28,7 @@ function escapeHtml(string) {
|
||||
function getAllPaths(router) {
|
||||
const paths = []
|
||||
|
||||
document.querySelectorAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
|
||||
Docsify.dom.findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])').forEach(node => {
|
||||
const href = node.href
|
||||
const originHref = node.getAttribute('href')
|
||||
const path = router.parse(href).path
|
||||
@@ -33,9 +45,9 @@ function getAllPaths(router) {
|
||||
return paths
|
||||
}
|
||||
|
||||
function saveData(maxAge) {
|
||||
localStorage.setItem('docsify.search.expires', Date.now() + maxAge)
|
||||
localStorage.setItem('docsify.search.index', JSON.stringify(INDEXS))
|
||||
function saveData(maxAge, expireKey, indexKey) {
|
||||
localStorage.setItem(expireKey, Date.now() + maxAge)
|
||||
localStorage.setItem(indexKey, JSON.stringify(INDEXS))
|
||||
}
|
||||
|
||||
export function genIndex(path, content = '', router, depth) {
|
||||
@@ -149,9 +161,13 @@ export function search(query) {
|
||||
|
||||
export function init(config, vm) {
|
||||
const isAuto = config.paths === 'auto'
|
||||
const isExpired = localStorage.getItem('docsify.search.expires') < Date.now()
|
||||
|
||||
INDEXS = JSON.parse(localStorage.getItem('docsify.search.index'))
|
||||
const expireKey = resolveExpireKey(config.namespace)
|
||||
const indexKey = resolveIndexKey(config.namespace)
|
||||
|
||||
const isExpired = localStorage.getItem(expireKey) < Date.now()
|
||||
|
||||
INDEXS = JSON.parse(localStorage.getItem(indexKey))
|
||||
|
||||
if (isExpired) {
|
||||
INDEXS = {}
|
||||
@@ -172,7 +188,7 @@ export function init(config, vm) {
|
||||
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
|
||||
.then(result => {
|
||||
INDEXS[path] = genIndex(path, result, vm.router, config.depth)
|
||||
len === ++count && saveData(config.maxAge)
|
||||
len === ++count && saveData(config.maxAge, expireKey, indexKey)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -323,6 +323,9 @@ body.sticky
|
||||
|
||||
.markdown-section iframe
|
||||
border 1px solid #eee
|
||||
/* fix horizontal overflow on iOS Safari */
|
||||
width 1px
|
||||
min-width 100%
|
||||
|
||||
.markdown-section table
|
||||
border-collapse collapse
|
||||
@@ -383,6 +386,9 @@ body.sticky
|
||||
border-radius 2px
|
||||
padding 1rem
|
||||
|
||||
.markdown-section ul.task-list > li
|
||||
list-style-type none
|
||||
|
||||
body.close
|
||||
.sidebar
|
||||
transform translateX(- $sidebar-width)
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Thasadith:400,400i,700')
|
||||
|
||||
$color-primary = #00ffff
|
||||
$color-bg = #f0ffff
|
||||
$color-text = #34495e
|
||||
$sidebar-width = 300px
|
||||
|
||||
@import 'basic/_layout'
|
||||
@import 'basic/_coverpage'
|
||||
|
||||
body
|
||||
background-color $color-bg
|
||||
|
||||
/* sidebar */
|
||||
.sidebar
|
||||
background-color $color-bg
|
||||
color #364149
|
||||
|
||||
li
|
||||
margin 6px 0 6px 0
|
||||
|
||||
ul li a
|
||||
color #505d6b
|
||||
font-size 14px
|
||||
font-weight normal
|
||||
overflow hidden
|
||||
text-decoration none
|
||||
text-overflow ellipsis
|
||||
white-space nowrap
|
||||
|
||||
&:hover
|
||||
text-decoration underline
|
||||
|
||||
ul li ul
|
||||
padding 0
|
||||
|
||||
ul li.active > a
|
||||
border-right 2px solid
|
||||
color var(--theme-color, $color-primary)
|
||||
font-weight 600
|
||||
|
||||
.app-sub-sidebar
|
||||
li
|
||||
&::before
|
||||
content '-'
|
||||
padding-right 4px
|
||||
float left
|
||||
|
||||
/* markdown content found on pages */
|
||||
.markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4, .markdown-section strong
|
||||
color #2c3e50
|
||||
font-weight 600
|
||||
|
||||
.markdown-section a
|
||||
color var(--theme-color, $color-primary)
|
||||
font-weight 600
|
||||
|
||||
&:hover
|
||||
text-decoration underline
|
||||
|
||||
.markdown-section h1
|
||||
font-size 2rem
|
||||
margin 0 0 1rem
|
||||
|
||||
.markdown-section h2
|
||||
font-size 1.75rem
|
||||
margin 45px 0 0.8rem
|
||||
|
||||
.markdown-section h3
|
||||
font-size 1.5rem
|
||||
margin 40px 0 0.6rem
|
||||
|
||||
.markdown-section h4
|
||||
font-size 1.25rem
|
||||
|
||||
.markdown-section h5
|
||||
font-size 1rem
|
||||
|
||||
.markdown-section h6
|
||||
color #777
|
||||
font-size 1rem
|
||||
|
||||
.markdown-section figure, .markdown-section p
|
||||
margin 1.2em 0
|
||||
|
||||
.markdown-section p, .markdown-section ul, .markdown-section ol
|
||||
line-height 1.6rem
|
||||
word-spacing 0.05rem
|
||||
|
||||
.markdown-section ul, .markdown-section ol
|
||||
padding-left 1.5rem
|
||||
|
||||
.markdown-section blockquote
|
||||
border-left 4px solid var(--theme-color, $color-primary)
|
||||
color #858585
|
||||
margin 2em 0
|
||||
padding-left 20px
|
||||
|
||||
.markdown-section blockquote p
|
||||
font-weight 600
|
||||
margin-left 0
|
||||
|
||||
.markdown-section iframe
|
||||
margin 1em 0
|
||||
|
||||
.markdown-section em
|
||||
color #7f8c8d
|
||||
|
||||
.markdown-section code
|
||||
background-color #f8f8f8
|
||||
border-radius 2px
|
||||
color #e96900
|
||||
font-family 'Roboto Mono', Monaco, courier, monospace
|
||||
font-size 0.8rem
|
||||
margin 0 2px
|
||||
padding 3px 5px
|
||||
white-space pre-wrap
|
||||
|
||||
.markdown-section pre
|
||||
-moz-osx-font-smoothing initial
|
||||
-webkit-font-smoothing initial
|
||||
background-color #f8f8f8
|
||||
font-family 'Roboto Mono', Monaco, courier, monospace
|
||||
line-height 1.5rem
|
||||
margin 1.2em 0
|
||||
overflow auto
|
||||
padding 0 1.4rem
|
||||
position relative
|
||||
word-wrap normal
|
||||
|
||||
/* code highlight */
|
||||
.token.comment, .token.prolog, .token.doctype, .token.cdata
|
||||
color #8e908c
|
||||
|
||||
.token.namespace
|
||||
opacity 0.7
|
||||
|
||||
.token.boolean, .token.number
|
||||
color #c76b29
|
||||
|
||||
.token.punctuation
|
||||
color #525252
|
||||
|
||||
.token.property
|
||||
color #c08b30
|
||||
|
||||
.token.tag
|
||||
color #2973b7
|
||||
|
||||
.token.string
|
||||
color var(--theme-color, $color-primary)
|
||||
|
||||
.token.selector
|
||||
color #6679cc
|
||||
|
||||
.token.attr-name
|
||||
color #2973b7
|
||||
|
||||
.token.entity, .token.url, .language-css .token.string, .style .token.string
|
||||
color #22a2c9
|
||||
|
||||
.token.attr-value, .token.control, .token.directive, .token.unit
|
||||
color var(--theme-color, $color-primary)
|
||||
|
||||
.token.keyword, .token.function
|
||||
color #e96900
|
||||
|
||||
.token.statement, .token.regex, .token.atrule
|
||||
color #22a2c9
|
||||
|
||||
.token.placeholder, .token.variable
|
||||
color #3d8fd1
|
||||
|
||||
.token.deleted
|
||||
text-decoration line-through
|
||||
|
||||
.token.inserted
|
||||
border-bottom 1px dotted #202746
|
||||
text-decoration none
|
||||
|
||||
.token.italic
|
||||
font-style italic
|
||||
|
||||
.token.important, .token.bold
|
||||
font-weight bold
|
||||
|
||||
.token.important
|
||||
color #c94922
|
||||
|
||||
.token.entity
|
||||
cursor help
|
||||
|
||||
.markdown-section pre > code
|
||||
-moz-osx-font-smoothing initial
|
||||
-webkit-font-smoothing initial
|
||||
background-color #f8f8f8
|
||||
border-radius 2px
|
||||
color #525252
|
||||
display block
|
||||
font-family 'Roboto Mono', Monaco, courier, monospace
|
||||
font-size 0.8rem
|
||||
line-height inherit
|
||||
margin 0 2px
|
||||
max-width inherit
|
||||
overflow inherit
|
||||
padding 2.2em 5px
|
||||
white-space inherit
|
||||
|
||||
.markdown-section code::after, .markdown-section code::before
|
||||
letter-spacing 0.05rem
|
||||
|
||||
code .token
|
||||
-moz-osx-font-smoothing initial
|
||||
-webkit-font-smoothing initial
|
||||
min-height 1.5rem
|
||||
|
||||
pre::after
|
||||
color #ccc
|
||||
content attr(data-lang)
|
||||
font-size 0.6rem
|
||||
font-weight 600
|
||||
height 15px
|
||||
line-height 15px
|
||||
padding 5px 10px 0
|
||||
position absolute
|
||||
right 0
|
||||
text-align right
|
||||
top 0
|
||||
@@ -0,0 +1,74 @@
|
||||
// load ES6 modules in Node.js on the fly
|
||||
require = require('esm')(module/*, options*/)
|
||||
|
||||
const {expect} = require('chai')
|
||||
|
||||
const {JSDOM} = require('jsdom')
|
||||
const XMLHttpRequest = require('xhr2') // JSDOM doesn't support XMLHttpRequest
|
||||
// TODO: try to fix tests when using `<div id="app"></div>` in body
|
||||
const markup = `<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body></body>
|
||||
</html>`
|
||||
// TODO: this may not work if tests are mutate the DOM, instead a new instance needs to be created
|
||||
// for every test case but that will slow down the tests
|
||||
const dom = new JSDOM(markup)
|
||||
|
||||
global.window = dom.window
|
||||
global.document = dom.window.document
|
||||
global.navigator = dom.window.navigator
|
||||
global.location = dom.window.location
|
||||
global.XMLHttpRequest = XMLHttpRequest
|
||||
|
||||
const {initMixin} = require('../src/core/init')
|
||||
const {routerMixin} = require('../src/core//router')
|
||||
const {renderMixin} = require('../src/core//render')
|
||||
const {fetchMixin} = require('../src/core/fetch')
|
||||
const {eventMixin} = require('../src/core//event')
|
||||
|
||||
// mimic src/core/index.js but for Node.js
|
||||
|
||||
function Docsify() {
|
||||
this._init()
|
||||
}
|
||||
|
||||
const proto = Docsify.prototype
|
||||
|
||||
initMixin(proto)
|
||||
routerMixin(proto)
|
||||
renderMixin(proto)
|
||||
fetchMixin(proto)
|
||||
eventMixin(proto)
|
||||
|
||||
function ready(callback) {
|
||||
const state = document.readyState
|
||||
|
||||
if (state === 'complete' || state === 'interactive') {
|
||||
return setTimeout(callback, 0)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', callback)
|
||||
}
|
||||
let docsify = null
|
||||
module.exports.init = function(callback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// return cached version / TODO: see above: this might not scale, new instance of JSDOM is reqiured
|
||||
if (docsify != null) {
|
||||
return resolve(docsify)
|
||||
}
|
||||
ready(_ => {
|
||||
docsify = new Docsify()
|
||||
return resolve(docsify)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
module.exports.expectSameDom = function(actual, expected) {
|
||||
const WHITESPACES_BETWEEN_TAGS = />(\s\s+)</g
|
||||
function replacer(match, group1) {
|
||||
return match.replace(group1, '')
|
||||
}
|
||||
expect(actual.replace(WHITESPACES_BETWEEN_TAGS, replacer).trim())
|
||||
.equal(expected.replace(WHITESPACES_BETWEEN_TAGS, replacer).trim())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
const path = require('path')
|
||||
|
||||
const {expect} = require('chai')
|
||||
|
||||
const {init, expectSameDom} = require('./_helper')
|
||||
|
||||
describe('render', function() {
|
||||
it('important content (tips)', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile('!> **Time** is money, my friend!')
|
||||
expect(output).equal('<p class="tip"><strong>Time</strong> is money, my friend!</p>')
|
||||
})
|
||||
|
||||
describe('lists', function() {
|
||||
it('as unordered task list', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile(`
|
||||
- [x] Task 1
|
||||
- [ ] Task 2
|
||||
- [ ] Task 3`)
|
||||
expect(output, `<ul class="task-list">
|
||||
<li class="task-list-item"><label><input checked="" disabled="" type="checkbox"> Task 1</label></li>
|
||||
<li class="task-list-item"><label><input disabled="" type="checkbox"> Task 2</label></li>
|
||||
<li class="task-list-item"><label><input disabled="" type="checkbox"> Task 3</label></li>
|
||||
</ul>`)
|
||||
})
|
||||
|
||||
it('as ordered task list', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile(`
|
||||
1. [ ] Task 1
|
||||
2. [x] Task 2`)
|
||||
expectSameDom(output, `<ol class="task-list">
|
||||
<li class="task-list-item"><label><input disabled="" type="checkbox"> Task 1</label></li>
|
||||
<li class="task-list-item"><label><input checked="" disabled="" type="checkbox"> Task 2</label></li>
|
||||
</ol>`)
|
||||
})
|
||||
|
||||
it('normal unordered', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile(`
|
||||
- [linktext](link)
|
||||
- just text`)
|
||||
expectSameDom(output, `<ul >
|
||||
<li><a href="#/link">linktext</a></li>
|
||||
<li>just text</li>
|
||||
</ul>`)
|
||||
})
|
||||
|
||||
it('unordered with custom start', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile(`
|
||||
1. first
|
||||
2. second
|
||||
|
||||
text
|
||||
|
||||
3. third`)
|
||||
expectSameDom(output, `<ol >
|
||||
<li>first</li>
|
||||
<li>second</li>
|
||||
</ol>
|
||||
<p>text</p>
|
||||
<ol start="3">
|
||||
<li>third</li>
|
||||
</ol>`)
|
||||
})
|
||||
|
||||
it('nested', async function() {
|
||||
docsify = await init()
|
||||
const output = docsify.compiler.compile(`
|
||||
- 1
|
||||
- 2
|
||||
- 2 a
|
||||
- 2 b
|
||||
- 3`)
|
||||
expectSameDom(output, `<ul >
|
||||
<li>1</li>
|
||||
<li>2<ul >
|
||||
<li>2 a</li>
|
||||
<li>2 b</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>3</li>
|
||||
</ul>`)
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user