Compare commits

...

807 commits

Author SHA1 Message Date
James Hegedus
1d3246a26f
Fix typo in docs #869
Fix typo
2019-06-18 09:02:10 +10:00
Parkjunwoo
8ea4865c84 Fix typo 2019-06-18 00:30:43 +09:00
Anton Wilhelm
676f84cffa chore: add changelog 4.9.4 2019-05-05 18:41:18 +02:00
Anton Wilhelm
7bdcadc7d7 [build] 4.9.4 next 2019-05-05 18:41:17 +02:00
Anton Wilhelm
5bd24fb83c Do not commit any files in lib during release 2019-05-05 18:35:34 +02:00
Anton Wilhelm
76cc0f672b Cleanup gitignore 2019-05-05 18:12:20 +02:00
Anton Wilhelm
3f50381090 Add matomo plugin to build script 2019-05-05 18:12:13 +02:00
Anton Wilhelm
b847c20cab Remove lib files from version control 2019-05-05 13:29:56 +02:00
James Hegedus
ce829b24d6
Merge pull request #827 from rodrigobdz/link-showcase
Fix #826: Link directly to showcase in readme and website
2019-04-26 17:01:22 +10:00
Rodrigo Bermudez Schettino
1ce53cf9ec
Readme: Improve outdated links to showcase
Link to Showcase in awesome-docsify.
2019-04-26 11:25:17 +08:00
Gorgi Kosev
bc1d8e4bda add scoring and sort to search plugin 2019-04-23 16:29:30 +02:00
Alexandru Cambose
78f5564a30 Updated to remove all headers under it 2019-04-23 07:08:29 +02:00
Alexandru Cambose
6cc069cb9f Added filtering in sidebar for ignoreSubHeading 2019-04-23 07:08:29 +02:00
Anton Wilhelm
d355272461 chore: add changelog 4.9.2 2019-04-21 12:06:17 +02:00
Anton Wilhelm
af161cd3b4 [build] 4.9.2 next 2019-04-21 12:06:16 +02:00
Anton Wilhelm
5bcb016bee Keep themes directory which is required for npm run dev 2019-04-21 12:05:41 +02:00
Anton Wilhelm
b38c2065e0 add execute access to release.sh 2019-04-21 12:01:04 +02:00
Anton Wilhelm
e5bab8d967 Add link to develop branch preview on netlify 2019-04-21 11:58:07 +02:00
Anton Wilhelm
da3e2d7b18 Remove lib directory from version control 2019-04-21 11:53:30 +02:00
Anton Wilhelm
b93a667f24 provide plugin for matomo 2019-04-21 11:17:14 +02:00
Anton Wilhelm
e8d850c9ba align dev index.html to production 2019-04-14 21:03:34 +02:00
Anton Wilhelm
514a027991
Minor update of bug template 2019-04-14 21:01:24 +02:00
Anton Wilhelm
314e2d9d39
Align IE support from root README.md 2019-04-14 11:27:03 +02:00
Anton Wilhelm
a86de3d81a Remove IE10 from supported browsers 2019-04-13 23:37:11 +02:00
Persevere Von
5f960102e7 Create .gitkeep
Fix #812
2019-04-13 17:38:57 +02:00
Anton Wilhelm
0bd5c8b020 fix #812 add empty themes directory for local watch setup 2019-04-13 15:42:22 +02:00
Anton Wilhelm
044a5ec2b8 add OS to GitHub template 2019-04-13 15:41:35 +02:00
Anton Wilhelm
b15eccfac0 add npm and nodejs version to template 2019-04-13 15:33:49 +02:00
Anton Wilhelm
4e0298088b
Merge pull request #817 from docsifyjs/update-github-templates
Update GitHub templates
2019-04-13 15:29:11 +02:00
Anton Wilhelm
09616dec06 Update GitHub templates 2019-04-13 15:28:12 +02:00
Anton Wilhelm
f74b53f53e
Merge pull request #733 from jthegedus/master
document customising page title with sidebar
2019-04-08 08:26:36 +02:00
Anton Wilhelm
bba44fb536
Merge pull request #714 from ENOVACOM/relative-path
feat: allows relative path, fixed #590
2019-04-07 22:23:18 +02:00
Anton Wilhelm
270fa6cb41
Merge pull request #807 from cyrilf/patch-1
Fix typo in edit button example
2019-04-05 19:58:06 +02:00
cyrilf
24e61f5e2f
Fix typo in Edit Button example
Missing trailing slash in the Edit button url
2019-04-06 00:11:54 +10:00
Sylvain Brocard
ca8ae50717 IE compatibility and add unit tests 2019-03-25 17:20:09 +01:00
Sylvain Brocard
31654f12ec feat: allows relative path, fixed #590 2019-03-25 16:33:03 +01:00
Anton Wilhelm
d80aa2189b
Merge pull request #792 from gemmadlou/master
Docsify publishing with AWS Amplify steps
2019-03-15 19:23:20 +01:00
Gemma Black
21cde83949
Docsify publishing with AWS Amplify steps
This is to help users be able to publish Docsify with AWS Amplify, so they don't get stuck on redirect rules and hash state issues.
2019-03-13 11:39:54 +00:00
Anton Wilhelm
c1d4961a64
Merge pull request #776 from docsifyjs/improve-test-setup
Improve test setup
2019-03-08 10:09:12 +01:00
Anton Wilhelm
2039e0dd1c rework TODOs 2019-03-06 21:53:09 +01:00
Anton Wilhelm
d5910bd1f9
Merge pull request #784 from spiritree/hotfix/gitalk
fix: re-render gitalk when router changed
2019-03-03 14:20:31 +01:00
Trevor Eyre
a35531967a Fixed iframe overflow bug for mobile Safari (#782)
Fixed iframe overflow bug for mobile Safari
2019-02-25 21:38:35 +01:00
Anton Wilhelm
dac0bfec6c split test into unit and integration
provide some dummy tests cases
2019-02-25 07:14:00 +01:00
Anton Wilhelm
01ea44106b fix xhr usage, fix init URL setup
provide full test setup including fixtures
2019-02-25 07:14:00 +01:00
spiritree
11ea1f8d12 fix: re-render gitalk when router changed 2019-02-25 09:38:56 +08:00
liqingwei
bc4d06bb16 chore: add changelog 4.9.1 2019-02-21 17:26:41 +08:00
liqingwei
29d9cda3de [build] 4.9.1 2019-02-21 17:26:40 +08:00
louislivi
140bf10377 fix: github assets url (#774) 2019-02-21 17:25:33 +08:00
liqingwei
dfd31b5de7 chore: add changelog 4.9.0 2019-02-19 11:26:54 +08:00
liqingwei
d1c72686bb [build] 4.9.0 2019-02-19 11:26:53 +08:00
Anton Wilhelm
8cd786c9d5
Merge pull request #760 from docsifyjs/provide-tests
Setup test environment and provide the first test
2019-02-14 19:23:55 +01:00
Anton Wilhelm
b53571810b Setup test environment and provide first tests 🌟 2019-02-14 18:33:33 +01:00
Anton Wilhelm
cb53106fa7
Merge pull request #737 from jthegedus/ssr-now-fix
Fix typo in Now SSR example code snippet
2019-02-05 08:42:27 +01:00
Anton Wilhelm
fd86c727af preperation to run the code in nodejs 2019-01-30 09:45:50 +01:00
John Hildenbiddle
69ef489210 fix: task list rendering (Fix #749) (#757)
This PR restores the task list presentation removed in 4.8:

- Add “task-list-item” class to task list `<li>` elms
- Hide list bullets on unordered task lists `<li>` elms

It also provides several improvements on the pre-4.8 presentation:

- Add “task-list” class to task list `<ul>` elms 
- Display list numbers on ordered task lists `<li>` elms
- Render accessible task list items by wrapping checkbox and text in `<label>` elm
- Allow task lists to be nested within standard ordered/unordered lists 

Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2019-01-30 14:21:50 +08:00
Andy Chen
c3345ba20c feat: Add new theme "dolphin" (#735)
Dolphin is a blue theme based on the theme vue, using the font Thasadith -- https://fonts.google.com/specimen/Thasadith as default.
2019-01-23 10:57:07 +08:00
Anton Wilhelm
1447c8a40a feat: Provide code fragments feature (#748) 2019-01-23 10:54:50 +08:00
jthegedus
3b952ac7c3 fix error in ssr config example 2019-01-06 10:26:21 +11:00
jthegedus
99dbaa3050 document customising page title with sidebar 2019-01-05 19:19:54 +11:00
D.A.Bashkirtsev
6ac7bace21 Fix getAndRemoveConfig regex (#708)
* Fix getAndRemoveConfig regex

Update getAndRemoveConfig regular expression for prevent cases, when header has name like "foo::bar::baz".

* Fix wrong regexp

* Fix regex

Ignore `:foo` cases
2018-12-05 10:29:55 +08:00
程康
28beff80f7 feat(search-plugin): add namespace option (#706)
* feat(search-plugin): add namespace option

* docs(search-plugin): update doc for option namespace
2018-12-05 10:29:44 +08:00
Qingwei Li
049726e11e fix: upgrade npm-run-all 2018-11-27 13:13:38 +08:00
Qingwei Li
a257a4ab4e chore: add changelog 4.8.6 2018-11-12 10:24:23 +08:00
Qingwei Li
a07a613312 [build] 4.8.6 2018-11-12 10:24:21 +08:00
程康
4db8cd6abf fix: IE10 compatibility (#691)
* fix: IE10 compatibility

* chore: use built-in helper fn
2018-11-12 10:22:14 +08:00
Li Yiming
a72e7490c3 docs: mermaid duplicated id, see #504 (#685)
Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2018-11-06 17:27:24 +08:00
qingwei.li
cc79e2e992 chore: add changelog 4.8.5 2018-11-02 08:59:35 +08:00
qingwei.li
5b6525b8f1 [build] 4.8.5 2018-11-02 08:59:34 +08:00
qingwei.li
aa719e3a47 fix: expose version info for Docsify, fixed #641 2018-11-02 08:53:46 +08:00
qingwei.li
22a5927eaf docs(helper): about markdown in html tag, fixed #655 fixed #667 2018-11-02 07:38:54 +08:00
qingwei.li
5ab9d8cb87 chore: add changelog 4.8.4 2018-11-02 02:17:37 +08:00
qingwei.li
f84242d380 [build] 4.8.4 2018-11-02 02:17:36 +08:00
cinwell.li
1a945d445a
fix(cover): Compatible with legacy styles, fixed #677 (#678)
Please makes sure these boxes are checked before submitting your PR, thank you!

* [ ] Make sure you are merging your commits to `master` branch.
* [ ] Add some descriptions and refer relative issues for you PR.
* [ ] DO NOT include files inside `lib` directory.
2018-11-02 02:14:02 +08:00
qingwei.li
81ec7c763b chore: update changelog 2018-11-01 19:19:45 +08:00
qingwei.li
d91a66cadd chore: add changelog 4.8.3 2018-11-01 19:09:51 +08:00
qingwei.li
58b130996e [build] 4.8.3 2018-11-01 19:09:50 +08:00
Qingwei Li
ee800a6572 docs: add codesandbox link 2018-11-01 17:59:03 +08:00
Qingwei Li
6daecc8a68 docs: add more plugins link" 2018-11-01 14:05:10 +08:00
Qingwei Li
325ecd08e6 chore: add changelog 4.8.2 2018-11-01 13:53:28 +08:00
Qingwei Li
9a09458eee [build] 4.8.2 2018-11-01 13:53:26 +08:00
cinwell.li
fdd8826b3b
fix(compiler): import prism-markup-templating, fixed #672 (#676) 2018-11-01 13:45:42 +08:00
cinwell.li
fcd1087c16
fix: cover button style, fixed #670, fixed #665 (#675)
Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.

A temporary solution, I will refactor this part of the code in the next major version.
2018-11-01 13:45:34 +08:00
程康
ab19b13210 feat: add heading config id (#671) 2018-11-01 08:07:10 +08:00
程康
5fcf210dd1 fix: use copy of cached value (#668) 2018-11-01 08:04:25 +08:00
程康
2edf47ec73 fix: update match regex (#669) 2018-11-01 07:09:34 +08:00
qingwei.li
b52607dec9 chore: update readme 2018-10-31 22:28:21 +08:00
qingwei.li
e89a2b3fea chore: update file size 2018-10-31 22:17:55 +08:00
qingwei.li
239eb3503b chore: add changelog 4.8.1 2018-10-31 22:08:23 +08:00
qingwei.li
fce40eae25 [build] 4.8.1 2018-10-31 22:08:23 +08:00
qingwei.li
d35059dd0b fix(compiler): prevent render of html code in paragraph, fixed #663 2018-10-31 22:05:24 +08:00
qingwei.li
4f588e0af4 fix(compiler): extra quotes for codeblock 2018-10-31 21:19:35 +08:00
qingwei.li
22ab7dfd14 chore(docs): remove new badege 2018-10-31 21:15:07 +08:00
qingwei.li
4805cb5322 feat: upgrade PrismJS, fixed #534 2018-10-31 21:14:25 +08:00
qingwei.li
2bc880d335 fix: ssr package dep, fixed #605 2018-10-31 21:11:06 +08:00
qingwei.li
b3b6116464 chore: add changelog 4.8.0 2018-10-31 20:46:05 +08:00
qingwei.li
137ae8d5b8 [build] 4.8.0 2018-10-31 20:46:04 +08:00
程康
4a23c4acf2 feat: Add hideOtherSidebarContent option (#661)
Allow user to configure whether or not to hide other sidebar content while showing searching results.

Related issue: https://github.com/docsifyjs/docsify/issues/535
2018-10-31 20:44:27 +08:00
cinwell.li
a39b214733
feat: upgrade marked to 0.5.x, fixed #645, close #644 (#662) 2018-10-31 20:34:56 +08:00
程康
1ce37bdc2e fix: missing variable declaration (#660)
### Issue

<img width="491" alt="screenshot 2018-10-30 at 23 31 35" src="https://user-images.githubusercontent.com/8396515/47757020-58587080-dc9c-11e8-867c-dc3feabcb651.png">

Sorry, forgot to include this line in previous PR.

-----
Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2018-10-31 08:22:59 +08:00
Prateeksha Singh
2cd4646386 [docs][vue-demo][minor] add ID in div element (#506) 2018-10-23 15:29:35 +08:00
Carlos García
42ea8af245 feat(compiler): support embedded mermaid (#629) 2018-10-23 15:29:14 +08:00
ivopuser
bf060befb7 fix: Update vue.styl (#634)
CSS style for functions is specified in buble.styl only. Thus, for example, bash commands from prism-bash.js (function section) are not highlighted. You can add a new CSS style with the right color you think fits better  :).
2018-10-23 15:28:49 +08:00
John Hildenbiddle
b329e1eb1d chore: Add docsify-tabs to list of plugins (#639) 2018-10-23 15:28:31 +08:00
John Hildenbiddle
63876c601d Fix: zoom-image target elements (#640)
- Ignore images outside of main content area (e.g. logo, sidenav icons, etc.)
- Ignore linked images (previous behavior broke linked images)

Fixes #520
2018-10-23 15:28:03 +08:00
John Hildenbiddle
0a0802aded feat: Allow base64, external, and relative logo values (#642)
Fix #577
2018-10-23 15:27:36 +08:00
John Hildenbiddle
94bc415534 feat: Add docsify version to $window.docsify object (#641)
Fix #521

Please makes sure these boxes are checked before submitting your PR, thank you!

* [ x ] Make sure you are merging your commits to `master` branch.
* [ x ] Add some descriptions and refer relative issues for you PR.
* [ x ] DO NOT include files inside `lib` directory.
2018-10-23 15:26:55 +08:00
程康
9e860177cb fix: Cache TOC for later usage in the case of cached file html (#649) 2018-10-23 15:24:22 +08:00
Waldir Pimenta
47a8d5faa4 chore: README: various small tweaks (#651)
- Change "What is it" heading to "What it is", as it's not a question
- Expand SSR acronym
- Slightly reword some passages for clarity
2018-10-23 15:01:55 +08:00
程康
18f0f03a89 fix: Remove target for mailto links (#652)
Closes https://github.com/docsifyjs/docsify/issues/625
2018-10-23 15:01:37 +08:00
程康
f6f4e32485 fix: Update getAllPath query selector (#653)
Closes https://github.com/docsifyjs/docsify/issues/614
2018-10-23 14:59:51 +08:00
slengyel-lnx
50c2434ab5 fix: improve external script plugin (#632) 2018-10-23 14:58:24 +08:00
Saugat Acharya
1897bb6af0 Fix typo and update open collective gold sponsor URL (#648)
```diff
+Gold
-Glod
```
2018-10-18 22:56:00 +08:00
Ciel
b0179e4c64 Updated sidebar documentation to clarify nesting (#626)
The documentation for how to create nested sidebars was unclear, and I could not find it anywhere else. After experimenting, I discovered the tactic and felt it should be in the docs.
2018-09-17 17:19:31 +08:00
Qingwei Li
c6eafa32b1 chore: add changelog 4.7.1 2018-08-30 12:09:25 +08:00
Qingwei Li
8336769127 [build] 4.7.1 2018-08-30 12:09:24 +08:00
jingsam
393e4ec044 Update _coverpage.md (#609) 2018-08-20 17:32:25 +08:00
keelii
100ab01811 Fix nested toc style issue on sidebar (#595)
1. Remove recursive toc outer tag li
2. remove .sidebar li marginLeft
3. add .sidebar ul marginLeft
2018-08-09 07:36:23 +08:00
Steven
a683e5bf2a Update url to markedjs (#601)
Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.

Related: #410

This updates urls to marked github repo and documentation.
2018-08-08 10:16:32 +08:00
cinwell.li
6a3cbba35b
chore: add gitter sidecar 2018-07-20 11:01:10 +08:00
IceHe.me
a923121be8 Fix VPS -> nginx deployment tips (#581)
`alias` field should be end with '/' in nginx.conf.
Or nginx server doesn't work.
2018-07-18 08:52:20 +08:00
Alexey Pyltsyn
f7274e141f docs(vue): improvements (#574) 2018-07-11 07:24:47 +08:00
cinwell.li
266d13bca6
docs: update md, fixed #570 2018-07-09 19:03:08 +08:00
Leon Zhang
de70d92fda fix the codefund load error (#569)
official domain name is changed, which cause the issue. change to use the newest plugin.

Please makes sure these boxes are checked before submitting your PR, thank you!

* [ ] Make sure you are merging your commits to `master` branch.
* [ ] Add some descriptions and refer relative issues for you PR.
* [ ] DO NOT include files inside `lib` directory.
2018-07-09 16:10:39 +08:00
qingwei.li
75f914354f chore: fix edit docs button, fixed #562 2018-07-07 08:41:30 +08:00
cinwellli
2e793061a8 chore: fix 'dev' script failed 2018-07-05 17:54:13 +08:00
cinwellli
78b3a6d007 chore: fix edit docs button, fixed #562 2018-07-05 17:48:05 +08:00
cinwell.li
845b1f2990
docs: update image resizing 2018-07-05 16:50:21 +08:00
qingwei.li
e281704e83 chore: add ru and es docs 2018-07-01 19:46:46 +08:00
qingwei.li
55755010c0 chore: move translation docs to alone repos 2018-07-01 19:33:31 +08:00
Johannes Rappen
73a38c3878 chore: update german docs, fix links (#560)
* updated german links
* fixed links where `QingWei-Li` should've been `docsifyjs`
  * naturally excluded donate links and links to private projects like `vuep` unrelated to docsify

---

See commit for details. If you have a question, just ask.
2018-07-01 13:48:44 +08:00
Manu Kind
62b4fc2121 Ability to set a custom page title via _sidebar.md (#557)
* Ability to set a custom page title via _sidebar.md

* fixes after review
2018-06-30 07:24:31 +08:00
qingwei.li
a91d2dab67 docs: add gitter 2018-06-29 22:22:14 +08:00
qingwei.li
a961e3b972 chore: add changelog 4.7.0 2018-06-29 21:36:13 +08:00
qingwei.li
3c94178805 [build] 4.7.0 2018-06-29 21:36:13 +08:00
qingwei.li
490242fb73 docs: update docs, fixed #526 2018-06-29 21:33:17 +08:00
cinwell.li
5c0de0aefe
feat: add unpkg field, close #531 (#558) 2018-06-29 21:28:09 +08:00
cinwell.li
04b36b0ef2
fix: alldow addition content in sidebar, fix #518, fix 539 (#543) 2018-06-29 21:27:54 +08:00
cinwell.li
3a7ad6299e
feat: support image resizing, resolve #508 (#545)
* feat: support image resizing, resolve #508

* add docs
2018-06-29 21:27:41 +08:00
cinwell.li
feea7f9b48
fix: loading embed files synchronously, fixed #525, fixed #527 (#544)
* fix: loading embed files synchronously, fixed #525, fixed #527

* fix
2018-06-29 21:27:07 +08:00
Petr Joachim
cd09d91434 frontmatter: Move frontmatter content into vm.frontmatter (#551) 2018-06-29 21:21:32 +08:00
hxh
a5f333a329 fix: path include chinese character cause hilight bug (#556) 2018-06-29 21:18:37 +08:00
Nik Sudan
7dcebe7544 docs: Correct default value for routerMode (#549)
This was `history` when it should have been set to `hash`. It also described the correct value in the example, which was misleading.

Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2018-06-25 21:17:02 +08:00
qingwei.li
cc636e6ca3 docs: add docsify-themable 2018-06-19 15:29:28 +08:00
qingwei.li
5523a2a2a9 docs: update netlify demo 2018-06-19 08:35:23 +08:00
cinwell.li
f8f22e5a3c
docs: add netlify (#542) 2018-06-19 08:31:25 +08:00
cinwell.li
ee72dd05e5
feat: add logo option, #264 (#541) 2018-06-19 08:19:21 +08:00
Justin Hartman
6c7ebc989d Fixed a typo in cover.md (#513) 2018-06-04 09:02:45 +08:00
Leon Zhang
57967d2caa upgrade docsify-plugin-codefund (#500)
make the ad show more beautiful
2018-05-23 19:02:02 +08:00
cinwell.li
c2886b1b62
Update _navbar.md 2018-05-23 15:26:28 +08:00
SidV
2d9e581d63 Adding Spanish (#489)
Fix: #484
2018-05-18 07:06:37 +08:00
SidV
604989ff04 Update cdn.md (#479)
`#compressed-file` instead `#compressed-files`
2018-05-10 06:53:44 +08:00
IsCod
26525db433 Update more-pages.md (#476)
zh-cn url
2018-05-06 18:49:10 +08:00
qingwei.li
2b0109b89a chore: add codefund 2018-05-02 22:38:34 +08:00
JP Erasmus
fb144b2e69 docs: Update installation instructions for v2 of docsify-copy-code plugin (#465) 2018-04-26 13:36:16 +09:00
Leon Zhang
ac695de859 add plugin for codefund (#471) 2018-04-26 13:34:28 +09:00
LeeRoJaN
e5a263f1bb Update custom-navbar.md (#446) 2018-04-10 09:14:50 +09:00
Nathan Yiangsupapaanontr
48e531bcfb Fix 'copy code' button displaying incorrectly (#448)
Set `.markdown-section pre`'s `position` to `relative` to fix _Copy code_ button not displaying correctly.
2018-04-10 09:14:24 +09:00
qingwei.li
1f338d2142 remove front matter, close #168 2018-04-04 06:12:26 +09:00
qingwei.li
cf05d7b26c chore: add changelog 4.6.10 2018-04-04 06:12:26 +09:00
qingwei.li
cb1a56d89b [build] 4.6.10 2018-04-04 06:12:26 +09:00
wangjingchao
62b7578468 fix duplicate maxLevel (#437) 2018-03-27 10:49:55 +08:00
qingwei.li
410efb2bc2 docs: fix contributors link, fixed #428 2018-03-19 11:22:19 +08:00
qingwei.li
1e99d7b514 Merge branch 'master' of github.com:QingWei-Li/docsify 2018-03-19 10:17:26 +08:00
qingwei.li
e4e011c81f fix: async install config, fixed #425 2018-03-19 09:56:29 +08:00
qingwei.li
4cd0e5eb49 chore: add changelog 4.6.9 2018-03-10 11:17:07 +08:00
qingwei.li
531e483c31 [build] 4.6.9 2018-03-10 11:17:06 +08:00
qingwei.li
6a3d69ae1a fix: upgrade medium-zoom, fixed #417 2018-03-10 11:16:32 +08:00
qingwei.li
ef1b42be23 chore: fix index.html 2018-03-07 17:54:50 +08:00
qingwei.li
54f45ecb0a chore: add changelog 4.6.8 2018-03-06 11:58:41 +08:00
qingwei.li
4c91fbc7cb [build] 4.6.8 2018-03-06 11:58:40 +08:00
qingwei.li
bfd0d18e48 fix: resolve path of image and embed files, fixed #412 2018-03-06 11:57:48 +08:00
Steven
74ff68a40e Update url to markedjs (#410)
* Update markdown.md

* Update markdown.md

* Update markdown.md
2018-03-04 07:35:01 +08:00
qingwei.li
e737a42f75 chore: add changelog 4.6.7 2018-03-03 23:29:17 +08:00
qingwei.li
a850b29545 [build] 4.6.7 2018-03-03 23:29:16 +08:00
qingwei.li
aeb692ed6b fix: layout css, fixed #409 2018-03-03 23:28:33 +08:00
qingwei.li
01140ceb54 chore: add changelog 4.6.6 2018-03-03 23:21:12 +08:00
qingwei.li
87129c0fb2 [build] 4.6.6 2018-03-03 23:21:11 +08:00
qingwei.li
95e95bd23b chore: remove fuck cssnano-cli 2018-03-03 23:20:07 +08:00
qingwei.li
8974f3964e chore: add changelog 4.6.5 2018-03-03 22:57:35 +08:00
qingwei.li
75222209da [build] 4.6.5 2018-03-03 22:57:34 +08:00
cinwell.li
8352a1e489
refactor: build config (#408)
* refactor: build config

* chore: fix conflict

* fix: 404 page path
2018-03-03 22:51:27 +08:00
Romain Lenzotti
9b3b4454de feat(config): Add 404 page options. (#406)
This feature add the notFoundPage options to customize the default 404 page
with a markdown file. It also support the localisation.
2018-03-03 22:09:01 +08:00
Romain Lenzotti
0933445e89 fix(navbar): Now Navbar isn't append to DOM when loadNavbar is falsy (#407) 2018-03-03 21:34:42 +08:00
qingwei.li
ec8daca3ec chore: add changelog 4.6.4 2018-03-01 22:42:48 +08:00
qingwei.li
1335baa22f [build] 4.6.4 2018-03-01 22:42:48 +08:00
qingwei.li
123c516836 docs: add fallbackLanguages 2018-03-01 22:40:55 +08:00
Romain Lenzotti
ecc0e04c70 feat(fetch): Add fallback languages configuration. (#402)
fallbackLanguages give the possibility to configure a list of languages which must used the default language when a page is missing in the requested language.
2018-03-01 22:37:30 +08:00
Romain Lenzotti
278a75ebd5 fix(render): Disable markdown parsing when the file is an HTML (#403) 2018-03-01 22:27:30 +08:00
Romain Lenzotti
b8a4e6ba1b chore: Update dev task in package.json (#404)
- Add rimraf to remove file (Windows/Unix/Mac compliant)
- Add concurrently module to run node app and nodemon concurrently
2018-03-01 22:21:14 +08:00
qingwei.li
01bbbaaf92 fix typo 2018-02-23 11:56:51 +08:00
qingwei.li
e5c64a3d8f fix typo 2018-02-23 11:56:12 +08:00
qingwei.li
e5ae6e8d25 Merge branch 'master' of github.com:qingwei-li/docsify 2018-02-15 18:36:03 +08:00
qingwei.li
702bb5b715 chore: add changelog 4.6.3 2018-02-15 18:34:48 +08:00
qingwei.li
7cdf751cc5 [build] 4.6.3 2018-02-15 18:34:47 +08:00
qingwei.li
6a09059645 fix(hook): beforeEach don\'t work, fixed #393 2018-02-15 18:34:19 +08:00
Jingjie Yang 杨竞颉
84f7b5c7c2 chore: typo (#392)
> Only coverpage is loaded when ~~When~~ visiting the home page.
2018-02-15 08:57:17 +08:00
qingwei.li
fd14e14022 chore: add changelog 4.6.2 2018-02-14 13:17:26 +08:00
qingwei.li
4b5185f0d7 [build] 4.6.2 2018-02-14 13:17:25 +08:00
qingwei.li
45a7464d23 fix(embed): broken in IE, fixed #389, fixed #391 2018-02-14 13:16:38 +08:00
qingwei.li
222cfdbbe4 chore: update readme 2018-02-13 17:18:53 +08:00
qingwei.li
890a7bf9b6 fix(embed): init value 2018-02-12 16:45:24 +08:00
qingwei.li
edc3201367 chore: update changelog 2018-02-12 16:30:17 +08:00
qingwei.li
8dd4378e89 chore: add changelog 4.6.1 2018-02-12 16:28:38 +08:00
qingwei.li
149d9929f8 [build] 4.6.1 2018-02-12 16:28:37 +08:00
qingwei.li
50fe22563b chore: fix lint 2018-02-12 16:28:10 +08:00
qingwei.li
4aafde85fb chore: remove console.log 2018-02-12 16:25:28 +08:00
qingwei.li
dc0c3ced4e fix(embed): compatible ssr 2018-02-12 16:25:28 +08:00
qingwei.li
62ce447fc3 refactor(embed): async fetch embed files, fixed #387 2018-02-12 16:25:28 +08:00
qingwei.li
471e407c73 chore: add changelog 4.6.0 2018-02-11 22:25:15 +08:00
qingwei.li
8fb74a2d87 [build] 4.6.0 2018-02-11 22:25:14 +08:00
qingwei.li
a41129425f chore: add docsify link 2018-02-11 22:22:06 +08:00
qingwei.li
e097f88f0e fix: homepage link 2018-02-11 22:22:06 +08:00
qingwei.li
033be4f2d7 fix: onlyCover 2018-02-11 22:22:06 +08:00
qingwei.li
371fbecfc2 chore: update helpers 2018-02-11 22:22:06 +08:00
qingwei.li
e810ba38cb chore: typo 2018-02-11 22:22:06 +08:00
qingwei.li
df84bc73ee chore: typo 2018-02-11 22:22:06 +08:00
qingwei.li
a0c60b707c chore: remove console.log 2018-02-11 22:22:06 +08:00
qingwei.li
7a33ec2133 docs: update file size 2018-02-11 22:22:06 +08:00
qingwei.li
cb900a68e5 docs: add requestHeaders and ext 2018-02-11 22:22:06 +08:00
qingwei.li
4bdcee2cb3 docs: add mutiple covers 2018-02-11 22:22:06 +08:00
qingwei.li
bd7ee84241 docs: update config 2018-02-11 22:22:06 +08:00
qingwei.li
bf5d999296 docs: update embed files 2018-02-11 22:22:06 +08:00
qingwei.li
56608e4739 docs: add embed files, resolve #383, resolve #333, resolve #134 2018-02-11 22:22:06 +08:00
qingwei.li
4d61b1e9a3 refactor: embed files feature, resolve #383, resolve #333, resolve #134 2018-02-11 22:22:06 +08:00
qingwei.li
c4d83f26a4 fix: dropdown scroll style, fixed #346 2018-02-11 22:22:06 +08:00
qingwei.li
248aa72cd2 feat(render): add ext option for custom file extenstion, close #340 2018-02-11 22:22:06 +08:00
qingwei.li
54ab4c9ff7 feat(fetch): add requestHeaders option, fixed #336 2018-02-11 22:22:06 +08:00
qingwei.li
f960c196bf fix: highlight homepage link, fixed #304 2018-02-11 22:22:06 +08:00
qingwei.li
85428ef49e fix: button style for coverpage, fixed #362 2018-02-11 22:22:06 +08:00
qingwei.li
342438f2a7 fix: build config 2018-02-11 22:22:06 +08:00
qingwei.li
9e824a4958 fix: ssr coverpage, fixed #273 2018-02-11 22:22:06 +08:00
qingwei.li
ebc10c4e43 fix: ssr compatible embedd 2018-02-11 22:22:06 +08:00
qingwei.li
b265fdd68a feat(cover): add onlyCover option, close #382 2018-02-11 22:22:06 +08:00
qingwei.li
f68ddf5af0 feat(render): mutilple coverpage, close #315 2018-02-11 22:22:06 +08:00
qingwei.li
9755439670 fix(search): escape special characters for search, fixed #369 2018-02-11 22:22:06 +08:00
qingwei.li
761ccc2c2b feat(compiler): support embedded file as code block, close #134 2018-02-11 22:22:06 +08:00
qingwei.li
524f52f882 feat(compiler): support embedded markdown, html, video, etc files, close #383, close #333 2018-02-11 22:22:06 +08:00
qingwei.li
a90a2e49e1 chore: fix package-lock 2018-02-11 22:22:06 +08:00
qingwei.li
864aa181a1 fix(search): custom clear button, fixed #271 2018-02-11 22:22:06 +08:00
qingwei.li
5e161a1420 feat: click sidebar menu add collapse and expand, close #294 2018-02-11 22:22:06 +08:00
cinwell.li
820abeb0fd chore: upgrade deps (#338) 2018-02-11 22:22:06 +08:00
jess
b073dd3ace chore: Activating Open Collective (#367)
* Added .github/ISSUE_TEMPLATE.md (optional)

* Added CONTRIBUTING.md (optional)

* Added backers and sponsors on the README

* Added call to donate after npm install (optional)

* Update README.md
2018-02-11 15:04:31 +08:00
cinwell.li
c7892e340b
chore: remove old logo 2018-02-11 10:56:27 +08:00
cinwell.li
21336444f4
chore: add google search meta 2018-02-11 09:58:23 +08:00
qingwei.li
39dd894650 chore: add changelog 4.5.9 2018-02-07 15:15:33 +08:00
qingwei.li
30f07b1d5b [build] 4.5.9 2018-02-07 15:15:32 +08:00
qingwei.li
4157173099 fix: upgrade marked 2018-02-07 15:15:06 +08:00
qingwei.li
b133fde32a chore: update changelog 2018-02-07 15:07:35 +08:00
qingwei.li
e3c9040419 chore: add changelog 4.5.8 2018-02-07 15:06:57 +08:00
qingwei.li
0e479613bc [build] 4.5.8 2018-02-07 15:06:56 +08:00
qingwei.li
368754ebd9 fix: cover style, fixed #381 2018-02-07 15:05:01 +08:00
Néfix Estrada
1c5d594228 Fixed a little error (#379)
There's nothing fancy on this commit
2018-02-05 09:37:10 +08:00
ItsPugle
0ecdacc7dc Adding Firebase Hosting deployment documentation (#378)
* Adding first version of Firebase Hosting documentation

* Renaming public to site for clarification
2018-02-04 19:06:04 +08:00
qingwei.li
bedc262d83 docs: update alias fixed #372 2018-01-31 13:13:16 +08:00
ItsPugle
9d5f561b28 Adding double-space so the !> is formatted correctly (#373) 2018-01-29 10:37:27 +08:00
qingwei.li
5447e4bd47 add awesome docsify link 2018-01-24 10:31:36 +08:00
qingwei.li
7cb4b58b67 chore: update badge 2018-01-23 23:53:50 +08:00
qingwei.li
4d9bbb0767 chore: add opencollective 2018-01-23 23:52:12 +08:00
cinwell.li
fea80b508c
docs: add discord link 2018-01-23 13:10:47 +08:00
yluoyu
bdcd9de4a2 fix:修复中文文件名导致侧边栏不正确问题 (#353) (#358) 2018-01-20 15:33:15 +08:00
Peter
2ec74e3a8d CBoard Usercase (#359)
Thanks for your work
2018-01-20 15:32:26 +08:00
Adrian Jones
20dabdcdd6 Add Tracy Debugger for ProcessWire to showcase (#357) 2018-01-19 22:27:24 +08:00
Yue Yang
2b4863381b Add preact-analysis to showcase (#356) 2018-01-19 17:27:56 +08:00
ItsPugle
689d3ddeaf chore: Fixing default option for externalLinkTarget (#348) 2018-01-14 22:29:03 +08:00
Sanctuary
adf90350c9 chore: Fix invalid package.json/HTML references (#345) 2018-01-12 12:54:07 +08:00
Gant Laborde
a12d3930e4 fix: updated deps (#337) 2018-01-05 08:06:43 +08:00
qingwei.li
299c2c85c0 docs: update quickstart 2018-01-03 09:56:15 +08:00
qingwei.li
bc3ed08d06 chore: add changelog 4.5.7 2017-12-29 16:46:56 +08:00
qingwei.li
d22ea84783 [build] 4.5.7 2017-12-29 16:46:56 +08:00
qingwei.li
7c8d1cee76 docs: add maxAge for ssr 2017-12-29 16:46:56 +08:00
cinwell.li
3a72074405
Update LICENSE 2017-12-26 18:01:57 +08:00
Lucas Leandro
04beaf7bd7 Add Vue Content Loading to showcase (#330) 2017-12-25 09:37:05 +08:00
Michal Stefanow
c17d892d30 Explaining the behaviour, closes #328 (#329) 2017-12-24 19:06:45 +08:00
Thomas Broadley
623e9c4239 Fix typos (#326) 2017-12-16 12:06:12 +08:00
qingwei.li
5d1fbdc5c9 docs: update plugin 2017-12-14 23:12:04 +08:00
qingwei.li
f78be4c900 feat: add navigation plugin, closed #180 2017-12-14 23:09:11 +08:00
qingwei.li
2ab0d7222c chore: update changelog 2017-12-14 22:17:30 +08:00
qingwei.li
178ba64157 chore: add changelog 4.5.6 2017-12-14 22:13:46 +08:00
qingwei.li
93a995f5bc [build] 4.5.6 2017-12-14 22:13:45 +08:00
qingwei.li
888f217356 fix(style): increase the tap targets of menu button, fixed #325 2017-12-14 22:12:58 +08:00
spiritree
6bfc81147f chore: add vue-orgchart in showcase section (#324) 2017-12-14 19:55:47 +08:00
qingwei.li
3af1641874 docs: update alias 2017-12-14 09:40:29 +08:00
qingwei.li
66c8fd501a fix: remove codesponsor 2017-12-13 10:29:53 +08:00
qingwei.li
d60f6f0d03 chore: update logo 2017-11-30 16:04:11 +08:00
Romain Lenzotti
2002cb8b22 chore: Add website example based on docsify (#319)
* chore: Add website example based on docsify

* Update README.md
2017-11-30 15:42:17 +08:00
qingwei.li
572ab1afae chore: add changelog 4.5.5 2017-11-30 09:43:46 +08:00
qingwei.li
d3dc8bcfb7 [build] 4.5.5 2017-11-30 09:43:44 +08:00
qingwei.li
0e693fcda2 chore: tweaks code 2017-11-30 09:43:25 +08:00
Leon Zhang
041b33e967 fix: disqus plugin issue (#318)
* fix issue disqus plugin issue

fix #317, disqus plugin make page refresh continuously.

* Update disqus.js
2017-11-30 09:42:02 +08:00
qingwei.li
b34a9375c3 chore: add changelog 4.5.4 2017-11-29 09:46:20 +08:00
qingwei.li
a1d2a1f1e3 [build] 4.5.4 2017-11-29 09:46:18 +08:00
qingwei.li
e43ded4ea7 fix(compiler): task lists style, fixed #215 2017-11-29 09:45:40 +08:00
Kamil
88df107c70 Add vue-sticker in Showcase section (#313)
Add one more component, that use docsify
2017-11-28 09:48:38 +08:00
Jonas Zhang
bc3ef52bbe docs: Improve the translation (#312)
* docs:Improve the translation

docs:Improve the translation

* docs:Improve the translation

docs:Improve the translation

* Update configuration.md

* Update deploy.md

* Update helpers.md
2017-11-24 10:11:15 +08:00
ItsPugle
9bed441a0c Update deploy.md (#311) 2017-11-24 00:09:36 +08:00
Jonas Zhang
af38fc70fd docs: translate zh-cn doc for more-pages.md (#310)
translate zh-cn doc for more-pages.md
2017-11-21 17:31:41 +08:00
qingwei.li
4f164e995e chore: add changelog 4.5.3 2017-11-11 10:15:17 +08:00
qingwei.li
b77f46a8e3 [build] 4.5.3 2017-11-11 10:15:16 +08:00
spiritree
9208e64939 feat: add gitalk plugin (#306) 2017-11-09 20:53:07 +08:00
qingwei.li
405349102f chore: add changelog 4.5.2 2017-11-09 13:06:59 +08:00
qingwei.li
9d6595d04b [build] 4.5.2 2017-11-09 13:06:57 +08:00
cinwell.li
d486eef6cc
feat: github task lists, close #215 (#305) 2017-11-09 13:06:23 +08:00
qingwei.li
b3c3180bab chore: add changelog 4.5.1 2017-11-07 20:03:42 +08:00
qingwei.li
c30af850a1 [build] 4.5.1 2017-11-07 20:03:41 +08:00
qingwei.li
2a2ed96eb8 feat: fetch files with the query params, fixed #303 2017-11-07 20:03:11 +08:00
Desmond
0d54c0cf83 Add zooming to showcase (#302) 2017-11-05 00:42:10 -05:00
qingwei.li
f27ce7d2b2 chore: add changelog 4.5.0 2017-11-04 13:56:25 +08:00
qingwei.li
2e1a7367a8 [build] 4.5.0 2017-11-04 13:56:24 +08:00
qingwei.li
7510f75968 fix lint 2017-11-04 13:56:08 +08:00
qingwei.li
fd7d4e0e4e feat: add disqus plugin, closed #123 2017-11-04 13:54:37 +08:00
qingwei.li
025bc5cddf chore: update all plugins.md, fixed #187 2017-11-02 10:48:09 +08:00
cinwell.li
8f1066a035
chore: update doc
fixed #187
2017-11-01 21:43:09 -05:00
qingwei.li
800c0c503a chore: add changelog 4.4.1 2017-10-31 21:48:15 +08:00
qingwei.li
d5194b4f6b [build] 4.4.1 2017-10-31 21:48:15 +08:00
cinwell.li
fa772cfa94
fix: zoom image plugin issue, fixed #187 (#300) 2017-10-31 08:20:08 -05:00
Li Xueli
cc98f56cdd fix: {docsify-ignore-all} and {docsify-ignore} bug (#299)
* fix {docsify-ignore-all} not work bug

* fix {docsify-ignore} bug
2017-10-31 08:19:48 -05:00
Li Xueli
752f68e5f8 chore: {docsify-ignore-all} not working properly (#298) 2017-10-31 03:11:40 -05:00
qingwei.li
bde17e1f10 chore: update template 2017-10-30 21:58:33 +08:00
qingwei.li
2db197f6dc chore: add changelog 4.4.0 2017-10-30 19:02:56 +08:00
qingwei.li
e8b5b09f2c [build] 4.4.0 2017-10-30 19:02:55 +08:00
cinwell.li
36bfc9d91d
fix: sidebar style issue on firefox, fixed #184 (#297) 2017-10-30 06:01:01 -05:00
cinwell.li
4ad96f3d12
feat: add helper for disabled link, fixed #295 (#296) 2017-10-30 06:00:31 -05:00
Aleksandr Filatov
1f04912a8f Added IT-films project which is based on docsify in readme (#293) 2017-10-27 09:23:21 -05:00
Sanctuary
65f17b4753 Move script tags above closing body tag (#290) 2017-10-22 20:38:38 -05:00
Ron Hashimoto
b3419f3842 docs: fix a broken code block (#286) 2017-10-20 09:41:38 -05:00
Max
0bb7e18018 Add rnback website to showcase (#287) 2017-10-20 09:41:26 -05:00
qingwei.li
86583e19ab chore: add changelog 4.3.15 2017-10-20 12:55:30 +08:00
qingwei.li
0bef31951c [build] 4.3.15 2017-10-20 12:55:29 +08:00
qingwei.li
a2b8eae8c4 fix: scroll active sidebar 2017-10-20 12:54:27 +08:00
qingwei.li
63d08369f6 chore: add changelog 4.3.14 2017-10-20 09:29:30 +08:00
qingwei.li
142623e87e [build] 4.3.14 2017-10-20 09:29:28 +08:00
qingwei.li
ab682684ca fix: codesponsor style 2017-10-20 09:29:11 +08:00
qingwei.li
e16c89e539 chore: add changelog 4.3.13 2017-10-17 10:28:28 +08:00
qingwei.li
f1272a2f1c [build] 4.3.13 2017-10-17 10:28:26 +08:00
LaySent
1b912272df feat: make whole search result clickable (#285) 2017-10-16 21:27:44 -05:00
Alexander Chibrikin
3476f6ff1f fix: duplicate results in search fixed #257 (#284) 2017-10-16 21:16:37 -05:00
qingwei.li
fac7ce693f chore: fix bootstrap script, fixed #282 2017-10-16 08:23:54 +08:00
Alexander Chibrikin
470ee474d4 chore: ignore ./lib , force add ./lib on release (#283) 2017-10-15 19:20:35 -05:00
qingwei.li
f7cf95a771 chore: add changelog 4.3.12 2017-10-15 21:26:50 +08:00
qingwei.li
4a9d594f7c [build] 4.3.12 2017-10-15 21:26:49 +08:00
LaySent
a3ab37952d fix: incorrect active link (#281)
* fix scroll issue in IE

* add meta tag for IE browser

* fix link render issue after page refreshing

* fix issue of incorrect active link

Should use both `path` and `id` to identify link, as `id` might not be unique under different paths
2017-10-15 08:25:49 -05:00
qingwei.li
6949455899 chore: add changelog 4.3.11 2017-10-15 10:44:35 +08:00
qingwei.li
4e52315564 [build] 4.3.11 2017-10-15 10:44:34 +08:00
qingwei.li
91d6337936 fix: broken links to same page heading, fix #278, fix #279 2017-10-15 10:43:35 +08:00
Gant Laborde
26cc466420 chore: Add another fan of docsify! (#280)
* Add another fan of docsify!

Thanks for such a great documentation tool!

* Update README.md
2017-10-14 21:34:58 -05:00
Nicolas Gomes De Oliveira
6f92a871ca Update language-highlight.md (#277) 2017-10-13 02:46:32 -05:00
qingwei.li
538ee3d0dc chore: add changelog 4.3.10 2017-10-12 22:51:32 +08:00
qingwei.li
49fd30d73d [build] 4.3.10 2017-10-12 22:51:30 +08:00
LaySent
abd885e133 fix: link render issue after page refreshing (#276)
* fix scroll issue in IE

* add meta tag for IE browser

* fix link render issue after page refreshing
2017-10-12 22:48:07 +08:00
qingwei.li
69b2040571 chore: add changelog 4.3.9 2017-10-12 00:37:10 +08:00
qingwei.li
e8d675c405 [build] 4.3.9 2017-10-12 00:37:09 +08:00
qingwei.li
5cc3e6c469 chore: update docs 2017-10-12 00:36:23 +08:00
LaySent
3e94cb6d76 fix: scroll issue in IE (#275)
* fix scroll issue in IE

* add meta tag for IE browser
2017-10-11 11:33:59 -05:00
cinwell.li
641e522779 Update deploy.md 2017-10-11 04:20:41 -05:00
Ho Chin Chee
026530de10 docs: Deployment guide for GitLab Pages (#274) 2017-10-10 20:59:00 -05:00
qingwei.li
1b74ef31a9 chore: add changelog 4.3.8 2017-10-07 10:08:28 +08:00
qingwei.li
25acd8ce77 [build] 4.3.8 2017-10-07 10:08:27 +08:00
qingwei.li
9b4e6669db fix(slugify): GitHub compatible heading links, fixed #272 2017-10-07 10:08:09 +08:00
qingwei.li
2e3fe59702 chore: add changelog 4.3.7 2017-10-02 13:27:16 +08:00
qingwei.li
7923608bc9 [build] 4.3.7 2017-10-02 13:27:15 +08:00
qingwei.li
e307308a78 chore: add vscode config 2017-10-02 13:26:45 +08:00
qingwei.li
c195d2d1a6 fix(slugify): GitHub compatible heading links, fixed #267 2017-10-02 13:26:36 +08:00
JP Erasmus
0624e592d8 docs: Add new copy-to-clipboard plugin (#265) 2017-09-28 21:14:09 -05:00
qingwei.li
aba2aec0d0 chore: prettier code 2017-09-22 10:07:10 +08:00
qingwei.li
a9704b5156 chore: add changelog 4.3.6 2017-09-21 09:51:53 +08:00
qingwei.li
16d730ec3d [build] 4.3.6 2017-09-21 09:51:51 +08:00
qingwei.li
08afec7d2a fix: style for codesponsor plugin 2017-09-21 09:51:02 +08:00
qingwei.li
fcee316d2c chore: use unpkg cdn 2017-09-20 10:06:23 +08:00
qingwei.li
1d2b546602 chore: add changelog 4.3.5 2017-09-20 09:03:55 +08:00
qingwei.li
97793bfd6c [build] 4.3.5 2017-09-20 09:03:54 +08:00
qingwei.li
ae3f74bfd4 chore: add build script 2017-09-20 09:01:31 +08:00
qingwei.li
04eaf4026b chore: add doc for codesponsor 2017-09-20 09:01:06 +08:00
qingwei.li
46ac4c3fd2 feat(plugin): add codesponsor plugin 2017-09-20 09:00:34 +08:00
Ken Berkeley
44dc68c6b2 Add vue2-datatable-component in Showcase (#255)
In my humble opinion, the doc of this project might have a better file structure for multiple languages
2017-09-13 03:38:25 -05:00
Chikara Chan
6c702d3362 fix: missed symbol (#254) 2017-09-13 03:38:09 -05:00
cinwell.li
c476e49164 Update README.md 2017-09-11 01:30:48 -05:00
Ying Zhong
0329bab359 Add xTeko website to showcase (#250) 2017-09-10 22:44:38 -05:00
qingwei.li
62aa161bff chore: add ga 2017-09-11 07:13:46 +08:00
qingwei.li
3854692331 chore: add codesponsor 2017-09-11 07:03:19 +08:00
qingwei.li
2066cb672d chore: add changelog 4.3.4 2017-09-07 23:05:24 +08:00
qingwei.li
5b7b60c553 [build] 4.3.4 2017-09-07 23:05:23 +08:00
qingwei.li
388ed3d685 fix: scroll position issue, fixed #234 2017-09-07 23:04:58 +08:00
qingwei.li
e898350a84 chore: update travisci 2017-09-06 18:25:56 +08:00
qingwei.li
9c62fb41b8 chore: add changelog 4.3.3 2017-09-06 17:18:33 +08:00
qingwei.li
9b73b0bf8a [build] 4.3.3 2017-09-06 17:18:32 +08:00
qingwei.li
9d43051791 fix(buble.css): tweaks code block style, fixed #249 2017-09-06 17:17:57 +08:00
Leon Zhang
f0aca1905c feat: add doc for react and vue demo box plugin (#247) 2017-09-05 09:46:05 +08:00
Jeremygao
2959497874 bugfix: config.js里面应为routerMode属性而非routerModel (#245) 2017-09-01 16:33:29 +08:00
qingwei.li
5a9921f5e7 chore: add changelog 4.3.2 2017-09-01 15:53:06 +08:00
qingwei.li
c9d556d829 [build] 4.3.2 2017-09-01 15:53:04 +08:00
qingwei.li
a0e1ea811a feat: add Edit on github plugin (thanks @njleonzhang) 2017-09-01 15:52:35 +08:00
qingwei.li
f82f41900e fix: sidebar highlight 2017-09-01 15:50:53 +08:00
Leon Zhang
7a4d9bc5cd add doc for Edit on github plugin (#244) 2017-09-01 15:43:43 +08:00
qingwei.li
5e522879dd chore: add changelog 4.3.1 2017-08-30 21:54:49 +08:00
qingwei.li
a72e7a3a3f [build] 4.3.1 2017-08-30 21:54:48 +08:00
qingwei.li
26c22a9843 chore: add lockfile 2017-08-30 21:54:17 +08:00
fy
4ce118d60f fixed sidebar item inactive issue & fixed _sidebar.md 404 issue & smooth scroll (#242)
* fixed sidebar item inactive issue & fixed _sidebar.md 404 issue & smooth scroll

* sidebar load fix
2017-08-30 21:48:36 +08:00
Jonas
3ad1645b90 fix yarn add command (#237)
package is published at `docsify-server-renderer` but README.md refers to `docsify-server-render`
2017-08-18 09:06:34 +08:00
qingwei.li
41967fa8fa chore(docs): fix markdown demo 2017-08-17 17:18:41 +08:00
qingwei.li
48276db15d chore: add changelog 4.3.0 2017-08-17 16:54:12 +08:00
qingwei.li
b67ea62c75 [build] 4.3.0 2017-08-17 16:54:10 +08:00
qingwei.li
f4800e09f1 feat(markdown): supports mermaid #137 2017-08-17 16:52:54 +08:00
qingwei.li
ac10de1c5b chore: update changelog 2017-08-15 23:48:53 +08:00
qingwei.li
d6ac7031b0 chore: add changelog 4.2.9 2017-08-15 23:47:21 +08:00
qingwei.li
4417f4669d [build] 4.2.9 2017-08-15 23:47:20 +08:00
qingwei.li
b7735066ff chore(*): remove document-ready 2017-08-15 23:46:47 +08:00
yelo
10045249d3 ensure document ready before init Docsify (#233) 2017-08-15 23:35:27 +08:00
qingwei.li
190710733e chore: add changelog 4.2.8 2017-08-10 08:46:26 +08:00
qingwei.li
b292d819fc [build] 4.2.8 2017-08-10 08:46:25 +08:00
qingwei.li
7f270f93c6 feat(compiler): support for setting target attribute for link, fixed #230 2017-08-10 08:45:49 +08:00
qingwei.li
c3a149679a chore(*): tweaks changelog 2017-08-05 09:56:53 +08:00
qingwei.li
5efa763075 chore: add changelog 4.2.7 2017-08-05 09:54:25 +08:00
qingwei.li
03a04f7898 [build] 4.2.7 2017-08-05 09:54:24 +08:00
qingwei.li
a88252c6b2 fix(style): nowrap => pre-wrap, fixed #228 2017-08-05 09:53:57 +08:00
Nedim Arabacı
2f5f90750a Noty added to showcase (#226)
Nice documentation site generator! Thanks.
2017-07-28 13:30:09 +08:00
qingwei.li
709c152950 chore: add changelog 4.2.6 2017-07-27 10:03:18 +08:00
qingwei.li
b09a5a317e [build] 4.2.6 2017-07-27 10:03:17 +08:00
qingwei.li
628e2115a3 fix(release): release shell 2017-07-27 10:02:49 +08:00
qingwei.li
271dde8f5e chore(*): fix changelog script 2017-07-27 09:58:37 +08:00
qingwei.li
1fa1619278 fix(css): hide the nav when the content has not yet been loaded 2017-07-27 09:50:21 +08:00
qingwei.li
3de3def8a8 chore(*): fix changelog script 2017-07-26 18:55:13 +08:00
qingwei.li
fb25726426 chore: add changelog 4.2.4 2017-07-26 18:52:59 +08:00
qingwei.li
36ddc42e91 [release] 4.2.4 2017-07-26 18:52:58 +08:00
qingwei.li
abb0f6019f [build] 4.2.4 2017-07-26 18:52:58 +08:00
qingwei.li
b8dd346baf fix(render): Remove getRootNode to be compatible with the lower version of Chrome, fixed #225 2017-07-26 18:52:36 +08:00
qingwei.li
7191d702e1 chore(*): add cdn 2017-07-26 08:42:07 +08:00
qingwei.li
c039f1bfc0 chore: add changelog 4.2.3 2017-07-26 08:37:36 +08:00
qingwei.li
f859d2d0b2 [release] 4.2.3 2017-07-26 08:37:35 +08:00
qingwei.li
9735f4036e [build] 4.2.3 2017-07-26 08:37:35 +08:00
qingwei.li
b8a96b867b Merge branch 'master' of github.com:qingwei-li/docsify 2017-07-26 08:37:02 +08:00
qingwei.li
b7b589b1bf feat(search): Supports the max depth of the search headline, fixed #223, resolve #129 2017-07-26 08:36:35 +08:00
qingwei.li
761e38f6ad chore: add changelog 4.2.2 2017-07-24 19:06:24 +08:00
qingwei.li
78899a0251 [release] 4.2.2 2017-07-24 19:00:39 +08:00
qingwei.li
357631c8b7 [build] 4.2.2 2017-07-24 19:00:12 +08:00
qingwei.li
17ff3d1506 fix: style rerender due to setting themeColor 2017-07-24 18:57:41 +08:00
Leon Zhang
f59aac478a Update README.md (#219) 2017-07-20 10:54:21 +08:00
qingwei.li
0dd2497467 chore: add history.md 2017-07-20 01:15:39 +08:00
qingwei.li
306136f6a3 chore: update changlog 2017-07-20 01:13:47 +08:00
qingwei.li
4aba9d0a25 chore(*): remove history.md 2017-07-20 01:05:01 +08:00
qingwei.li
3d2f23bcdc chore: add changelog 4.2.1 2017-07-20 00:58:17 +08:00
qingwei.li
b85eb0ff4b [release] 4.2.1 2017-07-20 00:58:16 +08:00
qingwei.li
efa8d25912 [build] 4.2.1 2017-07-20 00:58:15 +08:00
qingwei.li
437737cc5a chore: update release shell 2017-07-20 00:53:25 +08:00
qingwei.li
992ff77808 chore: remove yarnlock 2017-07-20 00:41:46 +08:00
yelo
4cf13db685 give the navbar some line-height (#216) 2017-07-19 16:09:10 +08:00
Kim Burgess
e54062f80d Remove unnecessary moduleName option from rollup config for plugins (#209) 2017-07-18 17:44:25 +08:00
qingwei.li
cee8ac6698
fix typo 2017-07-12 08:56:52 +08:00
Mario Nebl
d057f66fce docs: add commitlint to showcase (#207) 2017-07-12 08:55:27 +08:00
Dobromir Hristov
9b0f1978a4 docs: Add palettify in Showcase (#206) 2017-07-11 08:19:00 +08:00
qingwei.li
d9848c3384
[release] 4.2.0 2017-07-10 22:40:40 +08:00
qingwei.li
4dabae3bf2
[build] 4.2.0 2017-07-10 22:40:38 +08:00
qingwei.li
b430993f4f
chore: add changelog 2017-07-10 22:39:42 +08:00
cinwell.li
2e00f4c993 feat: ignore to compiled link, fixed #203 (#204)
* feat: ignore to compiled link, fixed #203

* feat: add noCompileLinks, fixed #203

* fix: remove test code
2017-07-10 22:38:26 +08:00
qingwei.li
7fb5ce6c84
docs: add alias 2017-07-10 22:23:09 +08:00
qingwei.li
c4aa22c56d
feat: alias option supports regexp, resolve #183 2017-07-10 22:19:55 +08:00
qingwei.li
9af855921e
fix: not found page 2017-07-09 10:48:41 +08:00
qingwei.li
4492c3e19f
[release] 4.1.14 2017-06-24 20:52:21 +08:00
qingwei.li
f598e53098
[build] 4.1.14 2017-06-24 20:52:21 +08:00
qingwei.li
4bde6d685c
add changelog 2017-06-24 20:51:53 +08:00
qingwei.li
ce0e9acd50
feat: add context attribute, fixed #191 2017-06-23 17:09:13 +08:00
qingwei.li
e8117e515d
fix: get file path, fixed jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070 2017-06-23 16:52:37 +08:00
cinwell.li
25e09dfe07 Merge pull request #195 from crawt/master
Filter picture
2017-06-18 02:19:14 +08:00
Leo Pan
a6b46a3e26 Filter picture
use regular filter picturn in search
2017-06-16 16:45:21 +08:00
Kevin Leung
d469442eae Update doc for external link target (#194) 2017-06-16 16:14:23 +08:00
qingwei.li
9f310bbd7d
[release] 4.1.13 2017-06-11 18:58:32 +08:00
qingwei.li
cc8a7c97b6
[build] 4.1.13 2017-06-11 18:58:31 +08:00
qingwei.li
19da658ba2
add changelog 2017-06-11 18:58:13 +08:00
qingwei.li
97db30a0b9
fix ga 2017-06-11 18:57:21 +08:00
Tony Ngan
3a0765e11e add samlify (#189) 2017-06-08 22:03:25 +08:00
Samina Fu
aaf71b1ac0 Add CDNJS version badge in README.md (#185)
This badge will show the version on CDNJS!
2017-06-06 12:44:33 +08:00
qingwei.li
b37781e949
[release] 4.1.12 2017-06-03 20:12:32 +08:00
qingwei.li
54a48dd3ff
[build] 4.1.12 2017-06-03 20:12:32 +08:00
qingwei.li
1aabc41db7
add changelog 2017-06-03 20:12:08 +08:00
qingwei.li
d087d5753b
fix(render): ubtitle in side bar shows undefined, fixed #182 2017-06-03 20:11:34 +08:00
qingwei.li
bb793ec08e
update package size 2017-06-02 22:37:27 +08:00
qingwei.li
6a78ae7ddc
[release] 4.1.11 2017-06-02 22:18:36 +08:00
qingwei.li
ac28040bd7
[build] 4.1.11 2017-06-02 22:18:36 +08:00
qingwei.li
b12f74b159
add changelog 2017-06-02 22:16:39 +08:00
qingwei.li
1304d2ea1a
fix(render): autoHeader does not work 2017-06-02 22:14:28 +08:00
qingwei.li
ccf4c7c5cc
fix(compiler): force reset toc when rendering sidebar fixed #181 2017-06-02 22:12:07 +08:00
qingwei.li
9b15d8d577
update cdn version 2017-06-02 18:04:20 +08:00
qingwei.li
642e7da7ee
[release] 4.1.10 2017-06-02 17:57:56 +08:00
qingwei.li
75381cf046
[build] 4.1.10 2017-06-02 17:57:56 +08:00
qingwei.li
7e2e5a7c90
add changelog 2017-06-02 17:57:32 +08:00
qingwei.li
6d48ce1266
fix(hash): hash routing crashes when url has querystring 2017-06-02 17:56:38 +08:00
qingwei.li
d286963da0
update readme 2017-06-02 17:41:13 +08:00
qingwei.li
8a4cedd962
replaced unpkg cdn with jsdelivr 2017-06-01 21:25:08 +08:00
Wei Wang
a3b7b66a76 Fix broken footer (#178) 2017-06-01 13:32:39 +08:00
qingwei.li
5a0d4b7897
docs(cdn): update jsdelivr cdn 2017-06-01 10:29:12 +08:00
Michelle Brier
fcfdb17b8d Add license scan badge (#176) 2017-06-01 07:44:19 +08:00
Michelle Brier
e4d2e7ec12 Add license report
Large report badge
2017-06-01 07:43:59 +08:00
qingwei.li
ece00e6b3a
[release] 4.1.9 2017-05-31 22:32:57 +08:00
qingwei.li
841829427b
[build] 4.1.9 2017-05-31 22:32:30 +08:00
qingwei.li
56c7b9ae2d
add changelog 2017-05-31 22:20:46 +08:00
qingwei.li
db8400a6ac
docs: add feature 2017-05-31 22:19:43 +08:00
qingwei.li
955d3d5988
fix(lifecycle): continue to handle data 2017-05-31 21:20:09 +08:00
qingwei.li
d9b487e67b
fix: can't render toc on first load 2017-05-31 20:42:29 +08:00
qingwei.li
91b66a5cac
fix(render): broken name link, fixed #167 2017-05-31 20:35:59 +08:00
qingwei.li
90bba60367
add package-lock.json 2017-05-31 14:22:43 +08:00
qingwei.li
d05c4f65a8
add lerna 2017-05-31 10:01:15 +08:00
qingwei.li
3380a62142
[release] 4.1.8 2017-05-31 08:39:22 +08:00
qingwei.li
8e418a1681
[build] 4.1.8 2017-05-31 08:39:22 +08:00
qingwei.li
20d60c401f
docs(write-a-plugin): update demo 2017-05-31 08:39:01 +08:00
qingwei.li
1938fd5146
docs(ssr): update 2017-05-31 08:35:01 +08:00
qingwei.li
3b74c49f00
fix(pure-css):add coverpage style, fixed #165 2017-05-31 08:27:11 +08:00
qingwei.li
22b50f07c3
fix: auto replace version 2017-05-31 08:25:00 +08:00
qingwei.li
ec887c1b5f
fix: update edit button demo 2017-05-30 20:17:17 +08:00
qingwei.li
036fdac131
feat: add edit button demo, close #162 2017-05-30 20:14:31 +08:00
qingwei.li
a64cee1236
feat: add edit button demo 2017-05-30 20:12:25 +08:00
qingwei.li
f943fede99
[release] 4.1.7 2017-05-30 19:40:03 +08:00
qingwei.li
e296439df3
[build] 4.1.7 2017-05-30 19:40:02 +08:00
qingwei.li
0014895c19
fix(ssr): clean files 2017-05-30 19:39:39 +08:00
qingwei.li
23590fa7e7
fix typo 2017-05-30 17:58:28 +08:00
qingwei.li
8689a37121
update readme 2017-05-30 16:34:36 +08:00
qingwei.li
05a0211861
update readme 2017-05-30 16:27:13 +08:00
qingwei.li
318189a13f
[release] 4.1.6 2017-05-30 16:18:24 +08:00
qingwei.li
42795a0483
[build] 4.1.6 2017-05-30 16:18:23 +08:00
qingwei.li
6b9e0922cf
fix(ssr): add debug 2017-05-30 16:16:36 +08:00
qingwei.li
8cb4189b96
update docs 2017-05-30 15:41:34 +08:00
qingwei.li
7eb6346075
[release] 4.1.5 2017-05-30 15:38:44 +08:00
qingwei.li
238e9633f9
[build] 4.1.5 2017-05-30 15:38:44 +08:00
qingwei.li
6db8c9e6c9
fix(ssr): missing package 2017-05-30 15:34:48 +08:00
qingwei.li
e160bcaded
[release] 4.1.4 2017-05-30 15:28:58 +08:00
qingwei.li
8cf69754b5
[build] 4.1.4 2017-05-30 15:28:58 +08:00
qingwei.li
79a83bc17d
fix(ssr): file path 2017-05-30 15:27:04 +08:00
qingwei.li
81c87f7926
update readme 2017-05-30 14:01:06 +08:00
qingwei.li
67ec128315
[release] 4.1.3 2017-05-30 13:58:28 +08:00
qingwei.li
77657e3b64
[build] 4.1.3 2017-05-30 13:58:28 +08:00
qingwei.li
9825db47af
fix: update babel config 2017-05-30 13:58:05 +08:00
qingwei.li
1a5593889e
[release] 4.1.2 2017-05-30 13:38:44 +08:00
qingwei.li
fc9cdf37c5
[build] 4.1.2 2017-05-30 13:38:44 +08:00
qingwei.li
80dba191d3
fix: update babel config 2017-05-30 13:38:20 +08:00
qingwei.li
5a0c37fcd3
[release] 4.1.1 2017-05-30 13:15:13 +08:00
qingwei.li
1462efedcd
[build] 4.1.1 2017-05-30 13:15:13 +08:00
qingwei.li
4cb20a5f9d
fix: build for ssr package 2017-05-30 13:13:41 +08:00
qingwei.li
490c8a19d3
docs(ssr): update sidebar 2017-05-30 12:55:09 +08:00
qingwei.li
4b838247ea
change: update 2017-05-30 12:52:52 +08:00
qingwei.li
b091f3f10d
docs(ssr): update 2017-05-30 12:36:23 +08:00
qingwei.li
0e74e6c15e
fix: remove history mode 2017-05-30 12:16:26 +08:00
qingwei.li
be8358fcdc
[release] 4.1.0 2017-05-30 12:14:33 +08:00
qingwei.li
1ae0a9a845
[build] 4.1.0 2017-05-30 12:14:33 +08:00
qingwei.li
7e169ad154
docs(changelog): 4.1.0 2017-05-30 12:05:25 +08:00
qingwei.li
8595c99c0b
docs(ssr): add ssr 2017-05-30 11:54:37 +08:00
qingwei.li
43fc8b8ab1
[release] 4.0.2 next 2017-05-30 10:14:42 +08:00
qingwei.li
ccec23df7f
[build] 4.0.2 next 2017-05-30 10:14:41 +08:00
qingwei.li
fc1cd3f11d
fix: basePath for history mode 2017-05-30 10:11:48 +08:00
qingwei.li
3f38810774
[release] 4.0.1 next 2017-05-30 06:34:35 +08:00
qingwei.li
3db4841da3
[build] 4.0.1 next 2017-05-30 06:34:35 +08:00
qingwei.li
b764b6e32c
fix: lint 2017-05-30 06:34:16 +08:00
qingwei.li
46261572e3
fix(ssr): remove context 2017-05-30 06:32:41 +08:00
qingwei.li
d53b8dadb3
[release] 4.0.0 next 2017-05-30 04:39:43 +08:00
qingwei.li
b9b9d87681
[build] 4.0.0 next 2017-05-30 04:39:43 +08:00
qingwei.li
d4f6072d10 refactor(ssr): path => context 2017-05-30 04:28:30 +08:00
qingwei.li
891475e132 refactor(ssr): for test 2017-05-30 04:28:30 +08:00
qingwei.li
1acfdd335c refactor(ssr): return promise 2017-05-30 04:28:30 +08:00
qingwei.li
1f4514dcad fix: lint 2017-05-30 04:28:30 +08:00
qingwei.li
eba1c987a8 fix(render): init event in ssr 2017-05-30 04:28:30 +08:00
qingwei.li
3444884905 feat: finish ssr 2017-05-30 04:28:30 +08:00
qingwei.li
6dea685fee feat: init ocsify-server-renderer 2017-05-30 04:28:30 +08:00
qingwei.li
f095eb888f feat: support history mode 2017-05-30 04:28:30 +08:00
qingwei.li
8741c746df refactor(router): clean global api 2017-05-30 04:28:30 +08:00
qingwei.li
2c7041c8fb refactor(router): dupports multiple mode 2017-05-30 04:28:30 +08:00
Wei Wang
2a21c40f17 Fix/script in theme (#163)
* Add newline before appended content

* Also add new line to dev page
2017-05-29 15:24:50 +08:00
ubird
000194c8da Add vue-amap into README.md (#161)
* Update README.md

* Update README.md
2017-05-25 11:57:37 +08:00
qingwei.li
fce1e47131
-> v3.7.3 2017-05-22 20:56:34 +08:00
qingwei.li
6d244139dd
bump: 3.7.3 2017-05-22 20:56:25 +08:00
qingwei.li
eca3368152
fix(render): find => filter 2017-05-22 20:54:50 +08:00
gpresland
bab76e004d Pretty dir tree 2017-05-22 08:03:42 +08:00
qingwei.li
eb9dc4671a
-> v3.7.2 2017-05-19 11:38:08 +08:00
qingwei.li
bb815cb2d4
bump: 3.7.2 2017-05-19 11:38:02 +08:00
qingwei.li
26db33dc31
tweaks 2017-05-19 11:36:56 +08:00
qingwei.li
6cbed4b4d8
-> v3.7.1 2017-05-19 08:39:13 +08:00
qingwei.li
b948cb06d7
bump: 3.7.1 2017-05-19 08:39:09 +08:00
qingwei.li
b2b474264f
fix: docsify-updated is undefined 2017-05-19 08:36:45 +08:00
qingwei.li
a8c73ee2b9
update yarnlock 2017-05-17 10:41:48 +08:00
qingwei.li
eda9bb8343
-> v3.7.0 2017-05-16 23:11:56 +08:00
qingwei.li
50e771e6a8
bump: 3.7.0 2017-05-16 23:11:50 +08:00
qingwei.li
2d73285de5
feat: add externalLinkTarget, close #149 2017-05-16 23:09:41 +08:00
qingwei.li
d2be5aecf8
feat: add docsify-updated, close #158 2017-05-16 23:03:22 +08:00
qingwei.li
ca0d6182b9 -> v3.6.6 2017-05-06 21:13:10 +08:00
qingwei.li
dacea8a39b bump: 3.6.6 2017-05-06 21:13:05 +08:00
qingwei.li
da75d70dee feat: support query string for the search, fixed #156 2017-05-06 21:11:04 +08:00
qingwei.li
6ed25cebe5 -> v3.6.5 2017-04-28 09:57:02 +08:00
qingwei.li
ee54141776 bump: 3.6.5 2017-04-28 09:56:58 +08:00
qingwei.li
51832d3506 fix(util): fix crash, fixed #154 2017-04-28 09:56:07 +08:00
qingwei.li
25ccc79e56 -> v3.6.4 2017-04-28 08:03:56 +08:00
qingwei.li
890d29f982 bump: 3.6.4 2017-04-28 08:03:49 +08:00
qingwei.li
76c041ad48 fix(util): correctly clean up duplicate slashes, fixed #153 2017-04-28 08:02:54 +08:00
qingwei.li
2c277b8f79 -> v3.6.3 2017-04-25 12:41:29 +08:00
qingwei.li
a5f6ccd1d1 bump: 3.6.3 2017-04-25 12:41:16 +08:00
qingwei.li
11c94b2149 changelog 3.6.3 2017-04-25 12:41:02 +08:00
qingwei.li
2653849a3e fix(external-script): script attrs 2017-04-25 12:39:58 +08:00
qingwei.li
d7b0d1b949 docs: update cdn 2017-04-25 12:13:56 +08:00
Frances Coronel
6911fb879b Add hire-me to showcase section 2017-04-21 08:14:22 +08:00
Kiko Beats
137a93c7b2 Add JS MythBusters to showcase (#148) 2017-04-17 20:32:38 +08:00
qingwei.li
5d5caa1f89 -> v3.6.2 2017-04-12 23:53:18 +08:00
qingwei.li
1dfd6cdcfe docs: add changelog 2017-04-12 23:53:11 +08:00
qingwei.li
91c6db2902 bump: 3.6.2 2017-04-12 23:52:25 +08:00
qingwei.li
94d6603c06 feat(external-script): detect more than one script dom, fixed #146 2017-04-12 23:51:16 +08:00
qingwei.li
920f624b5c -> v3.6.1 2017-04-12 23:46:46 +08:00
qingwei.li
8fb1350728 bump: 3.6.1 2017-04-12 23:46:46 +08:00
Mehdy Dara
c1df94662a GA: Send hash instead of complete href (#147)
On https://docsify.js.org/#/quickstart

send "#/quickstart" instead of "https://docsify.js.org/#/quickstart"
2017-04-12 23:45:58 +08:00
qingwei.li
9b7e5f5814 feat(event): Collapse the sidebar when click outside element in the small screen 2017-04-09 12:44:23 +08:00
qingwei.li
432bcfb54b -> v3.6.0 2017-04-09 12:12:32 +08:00
qingwei.li
4f98497284 bump: 3.6.0 2017-04-09 12:12:21 +08:00
cinwell.li
9220523a40 feat(render): add mergeNavbar option, close #125, #124 (#145) 2017-04-09 12:10:37 +08:00
qingwei.li
b8100c0755 -> v3.5.2 2017-04-05 21:31:27 +08:00
qingwei.li
be0230ebe9 bump: 3.5.2 2017-04-05 21:31:22 +08:00
cinwell.li
aa6d2afce8 Merge pull request #143 from bojand/master
Properly handle anchor links local within a file. Fix #142
2017-04-01 10:26:36 +08:00
Bojan Djurkovic
a706203879 add optional current route param to toURL and use it to properly compose local anchor links 2017-03-31 09:08:05 -03:00
Bojan Djurkovic
fbc75bdb95 fix code style by removing semicolons 2017-03-30 20:37:26 -03:00
Bojan Djurkovic
5af174bd20 in toURL test for anchor links and if so prepend the currentPath to the generated path. fixes #142 2017-03-30 20:26:53 -03:00
qingwei.li
e70327ab2b -> v3.5.1 2017-03-25 16:26:11 +08:00
qingwei.li
7209b82982 bump: 3.5.1 2017-03-25 16:26:07 +08:00
qingwei.li
594299ffbd fix: .md file extension regex 2017-03-25 16:25:03 +08:00
qingwei.li
e9bbfd4c53 -> v3.5.0 2017-03-25 15:53:32 +08:00
qingwei.li
96bc09211e bump: 3.5.0 2017-03-25 15:53:23 +08:00
qingwei.li
8f11653b41 feat(route): auto remove .md extension 2017-03-25 15:52:21 +08:00
cinwell.li
6aae64fd54 Merge pull request #138 from jrappen/master
Fixing some minor issues
2017-03-19 18:45:43 +08:00
Johannes Rappen
33b7c512bb fix QingWei-Li/docsify#126 2017-03-18 23:22:25 +01:00
Johannes Rappen
bf35471a2b fix: adjust display on small screens 2017-03-18 19:09:24 +01:00
Johannes Rappen
b022aaf14e fix: navbar labels for German 2017-03-18 18:01:44 +01:00
Johannes Rappen
03d8281868 update helper files 2017-03-18 17:21:59 +01:00
Johannes Rappen
4a0cfa799e move settings into a single object 2017-03-18 17:11:07 +01:00
qingwei.li
2c2ac5f461 -> v3.4.4 2017-03-17 17:12:47 +08:00
qingwei.li
1edcd63cdb bump: 3.4.4 2017-03-17 17:12:41 +08:00
qingwei.li
2d6a51b057 fix(search): fix input style 2017-03-17 17:11:46 +08:00
cinwell.li
bf1ae7802d Merge pull request #135 from xsdlr/master
fix search plugin match bug
2017-03-17 16:45:49 +08:00
xsdlr
cf9b7c99e4 fix search plugin match bug 2017-03-16 18:29:02 +08:00
qingwei.li
c20f3298d8 -> v3.4.3 2017-03-16 08:51:01 +08:00
qingwei.li
dd7d9aa4ad bump: 3.4.3 2017-03-16 08:50:51 +08:00
qingwei.li
bba957d3bc docs: add docsify-ignore 2017-03-16 08:48:21 +08:00
cinwell.li
28b3cb4249 Merge pull request #133 from jrappen/master
fix erroneously removal of "themes" from files, fix #132
2017-03-16 07:06:26 +08:00
Johannes Rappen
97e730d7e3 fix erroneously removal of "themes" from files, fix QingWei-Li/docsify#132 2017-03-16 00:00:02 +01:00
cinwell.li
65a6b3c659 Merge pull request #132 from jrappen/master
fix some minor issues
2017-03-16 06:37:26 +08:00
Johannes Rappen
f6b827f7bc fix some links 2017-03-15 22:32:33 +01:00
Johannes Rappen
24d1b0feb6 use rem instead of em, fix QingWei-Li/docsify#116 2017-03-15 22:23:48 +01:00
Johannes Rappen
54da5fb6c8 update package.json
* remove "themes" from "files" as it is a subfolder of "src"
* reorder elements
* update dependencies
* update devDependencies
* make author a dictionary
2017-03-15 22:07:28 +01:00
Chris Anselmo
d57b80e224 Add ability to ignore headers when generating toc (#127)
* Added ability to ignore some or all headings when generating toc in sidebar

* Added documentation for ignoring sub headers

* Fixed minor test issues
2017-03-15 15:50:26 +08:00
cinwell.li
788bbb36b4 Merge pull request #122 from Leopoldthecoder/master
fix external-script not inserting script at right place
2017-03-12 20:54:17 +08:00
Leopoldthecoder
92070e3099 fix external-script not inserting script at right place 2017-03-12 20:18:46 +08:00
qingwei.li
de0ad0f04c docs(index.html): update languages 2017-03-12 08:44:52 +08:00
qingwei.li
ceafc37bb3 docs(index.html): update config 2017-03-12 08:27:29 +08:00
cinwell.li
1f19cb2ade Merge pull request #121 from jrappen/master
add German docs
2017-03-12 08:10:42 +08:00
Johannes Rappen
33393ef0f6 add German docs 2017-03-11 22:13:25 +01:00
qingwei.li
4ff8fb2c60 -> v3.4.2 2017-03-11 19:33:03 +08:00
qingwei.li
9b858fc4c4 bump: 3.4.2 2017-03-11 19:31:57 +08:00
qingwei.li
3aef37a445 feat(emojify): add no-emoji option 2017-03-11 19:30:38 +08:00
qingwei.li
37daa7ef9c docs(vue): fix typo 2017-03-11 18:27:43 +08:00
qingwei.li
b0da9f23d3 docs(vue): fix typo 2017-03-11 18:16:34 +08:00
qingwei.li
1f66e61f63 -> v3.4.1 2017-03-10 12:02:32 +08:00
qingwei.li
5f07d5a9f3 bump: 3.4.1 2017-03-10 12:02:23 +08:00
qingwei.li
d1d8f88a1a add changelog 2017-03-10 12:00:47 +08:00
qingwei.li
b9a7275c8f fix(dom): Disable the dom cache when vue is present, fixed #119 2017-03-10 11:58:27 +08:00
cinwell.li
0fddd1ced4 Merge pull request #118 from jrappen/master
Update English docs and sort css
2017-03-10 11:57:59 +08:00
Johannes Rappen
262bf13964 order css source alphabetically 2017-03-09 22:22:35 +01:00
Johannes Rappen
0b1fc2343f update main markdown files 2017-03-09 22:19:57 +01:00
Johannes Rappen
6eada5a2f7 update english docs 2017-03-09 22:19:07 +01:00
qingwei.li
86923d03d3 -> v3.4.0 2017-03-09 20:30:44 +08:00
qingwei.li
8b696cd99d bump: 3.4.0 2017-03-09 20:30:38 +08:00
qingwei.li
3b30d42e9a add changelog 2017-03-09 20:29:01 +08:00
qingwei.li
50fa6fcb89 feat(zoom-image): add plugin 2017-03-09 20:26:33 +08:00
qingwei.li
8463f4d5c5 -> v3.3.0 2017-03-07 12:00:47 +08:00
qingwei.li
9e7d365872 bump: 3.3.0 2017-03-07 12:00:23 +08:00
cinwell.li
9e9ad57540 Merge pull request #115 from Leopoldthecoder/master
add external-script plugin
2017-03-07 11:57:13 +08:00
Leopoldthecoder
9c54bafae4 switch to doneEach and cache #main dom 2017-03-07 11:30:09 +08:00
Leopoldthecoder
1aa6636ba8 add external-script plugin 2017-03-06 23:57:28 +08:00
qingwei.li
723a6040f2 docs: fix typo, fixed #114 2017-03-05 10:26:59 +08:00
gpresland
d6b5403982 Update dictory structure in more-pages.md (#113)
Cleaner unicode structure.
2017-03-04 14:53:22 +08:00
杨奕
9f0fc83b54 Fix nav showing while loading (#112) 2017-03-03 10:43:36 +08:00
Prayag Verma
b02e1f1409 Fix a typo (#111)
ture → true
2017-03-02 14:05:03 +08:00
qingwei.li
bca7b00c94 Update changelog 2017-02-28 22:06:17 +08:00
qingwei.li
0ae14e8ddc -> v3.2.0 2017-02-28 22:03:53 +08:00
qingwei.li
61e0aacb43 bump: 3.2 2017-02-28 22:03:47 +08:00
qingwei.li
b927a30cc6 docs(changelog): 3.2 2017-02-28 22:03:09 +08:00
qingwei.li
0d59ee939f fix(render): Toc rendering error, fixed #106 2017-02-28 22:03:09 +08:00
qingwei.li
0aead898eb docs: updates 2017-02-28 22:03:09 +08:00
qingwei.li
d3c9fbd124 feat(search): Localization for no data tip, close #103 2017-02-28 22:03:09 +08:00
qingwei.li
f3fc596951 fix(fetch): load sidebar and navbar for parent path, fixed #100 2017-02-28 22:03:09 +08:00
qingwei.li
07a2a91296 docs(configuration): nameLink 2017-02-28 22:03:09 +08:00
qingwei.li
8ad835ca26 feat(render) nameLink for each route, fixed #99 2017-02-28 22:03:09 +08:00
qingwei.li
0994663c5a -> v3.1.2 2017-02-27 11:47:26 +08:00
qingwei.li
5067769a65 bump: 3.1.2 2017-02-27 11:47:22 +08:00
woshiguabi
92d6e8a1ee Update search.js 2017-02-27 11:45:14 +08:00
qingwei.li
0dd9feffe5 -> v3.1.1 2017-02-24 20:19:40 +08:00
qingwei.li
82173627e5 bump: 3.1.1 2017-02-24 20:19:34 +08:00
qingwei.li
507d9e834c fix(search): dont search nameLink, fixed #102 2017-02-24 20:18:17 +08:00
qingwei.li
83ae93cae0 docs: update package size 2017-02-24 20:18:17 +08:00
qingwei.li
8f9bf29ee5 fix(render): custom cover background image 2017-02-24 20:18:17 +08:00
qingwei.li
d67d25fed4 fix(tpl): extra character, fixed #101 2017-02-24 20:18:17 +08:00
qingwei.li
95a324c7e0 docs: update changelog 2017-02-22 22:32:51 +08:00
qingwei.li
5712c1f59d -> v3.1.0 2017-02-22 22:31:25 +08:00
qingwei.li
490a2cd64e bump: 3.1 2017-02-22 22:31:16 +08:00
qingwei.li
b8a3d8f380 fix(search): incorrect anchor link, fixed #90 2017-02-22 22:30:07 +08:00
qingwei.li
855c450a97 feat(emoji): add emoji plugin 2017-02-22 22:30:07 +08:00
qingwei.li
2521c58c73 docs: tweaks 2017-02-22 22:11:05 +08:00
sokamal
8df746e9d1 add emojis (#93)
* 更新 emoji 支持,增加 github emoji 列表,防止 “2017-02-22 15:13:22” 中的 :13: 被转义。

* 修正代码格式。
2017-02-22 16:40:48 +08:00
Le Liu
2945e94e3c fix the extra character when github corner is enabled (#91) 2017-02-22 14:02:16 +08:00
qingwei.li
083cc4af56 docs(sw): cache unpkg.com 2017-02-22 09:39:17 +08:00
qingwei.li
5cab56cc92 docs(pwa): fix typo 2017-02-21 23:00:22 +08:00
qingwei.li
d8ad679e2c docs(pwa): add pwa 2017-02-21 22:16:10 +08:00
qingwei.li
f2975a5e5e fix(sw): update white list 2017-02-21 21:30:35 +08:00
qingwei.li
58789bfec7 -> v3.0.5 2017-02-21 21:22:36 +08:00
qingwei.li
e7e519bad2 bump: 3.0.5 2017-02-21 21:22:25 +08:00
qingwei.li
f7111b5903 feat(pwa): add sw.js 2017-02-21 21:21:24 +08:00
qingwei.li
42b2dba589 fix(layout.css): loading style 2017-02-21 21:21:24 +08:00
qingwei.li
2a1157a706 fix(event): highlight sidebar when clicked, fixed #86 2017-02-21 21:21:24 +08:00
qingwei.li
3394ebb9a5 fix(gen-tree): cache toc list, fixed #88 2017-02-21 21:21:24 +08:00
qingwei.li
b4fc6a9d72 fix typo 2017-02-21 14:05:58 +08:00
Jintzo
feb4b89461 Update docs: Getting started (#85)
* fixed look of links in blockquote

* updated main README

* updated getting started

* updated more-pages

* make custom sidebar loading clear

* updated custom navbar

* added markdown comments

* updated cover documentation

* updated cover page

* updated sidebar
2017-02-21 14:04:16 +08:00
qingwei.li
83d7862505 -> v3.0.4 2017-02-20 08:59:43 +08:00
qingwei.li
75686f1624 bump: 3.0.4 2017-02-20 08:59:38 +08:00
qingwei.li
780c1e580e fix(render): execute script 2017-02-20 08:57:09 +08:00
qingwei.li
35dd2e16fa fix(render): disable rendering sub list when loadSidebar is false 2017-02-19 23:23:43 +08:00
qingwei.li
be6dcacde7 -> v3.0.3 2017-02-19 22:53:05 +08:00
qingwei.li
066fff4beb bump: 3.0.3 2017-02-19 22:52:59 +08:00
Le Liu
42fb331079 Change description for Snipaste (#84) 2017-02-19 22:50:05 +08:00
Jintzo
f15e45c693 fixed look of links in blockquote 2017-02-19 22:49:44 +08:00
qingwei.li
6b08546654 fix(scroll) highlight bug 2017-02-19 22:29:35 +08:00
qingwei.li
46ff5e14bf tweaks code 2017-02-19 20:11:27 +08:00
qingwei.li
b51d714d3c -> v3.0.2 2017-02-19 15:27:49 +08:00
qingwei.li
2c9fdbe7f9 bump: 3.0.2 2017-02-19 15:27:39 +08:00
qingwei.li
bf593a77ad fix(search): add lazy input 2017-02-19 15:25:36 +08:00
qingwei.li
3b127a161c fix(compiler): link 2017-02-19 15:06:21 +08:00
qingwei.li
20a83808f3 -> v3.0.1 2017-02-19 14:55:28 +08:00
qingwei.li
4419b2119e bump: 3.0.1 2017-02-19 14:55:20 +08:00
qingwei.li
cd99b522e7 fix(route): empty alias 2017-02-19 14:54:22 +08:00
qingwei.li
787656a1ee docs(index): enable execute script 2017-02-19 14:44:37 +08:00
qingwei.li
f573caa3c6 docs(cover): update version number 2017-02-19 14:41:27 +08:00
qingwei.li
0455106a62 -> v3.0.0 2017-02-19 14:40:30 +08:00
qingwei.li
74ce0bf588 bump: 3.0.0 close #78 2017-02-19 14:40:16 +08:00
qingwei.li
d355bb4ebe docs: add changeog 2017-02-19 14:38:38 +08:00
qingwei.li
dbb92782cf feat(front-matter): add front matter[WIP] 2017-02-19 14:38:38 +08:00
qingwei.li
754f92ce8e fix(search) ignore empty link 2017-02-19 14:38:38 +08:00
qingwei.li
fcb66e8bc7 fix(search): escape html 2017-02-19 14:38:38 +08:00
qingwei.li
2efd859f71 fix(search): fix default config 2017-02-19 14:38:38 +08:00
qingwei.li
515331763d docs(plugin): add search doc 2017-02-19 14:38:38 +08:00
qingwei.li
2351c3e68c feat(search): Localization for search placeholder, close #80 2017-02-19 14:38:38 +08:00
qingwei.li
079bd00395 refactor(plugins): update search plugin 2017-02-19 14:38:38 +08:00
qingwei.li
86594a3118 feat(themes): add loading info 2017-02-19 14:38:38 +08:00
qingwei.li
a6d823b826 docs(markdown): update markdown config 2017-02-19 14:38:38 +08:00
qingwei.li
7b6a2ac404 fix(render): support html file 2017-02-19 14:38:38 +08:00
qingwei.li
3e7d6ab26c docs: add executeScript demo 2017-02-19 14:38:38 +08:00
qingwei.li
4b64386465 docs: move changelog to history 2017-02-19 14:38:38 +08:00
qingwei.li
c7e09c34a7 fix(compiler): link 2017-02-19 14:38:38 +08:00
qingwei.li
c108645e34 docs: add autoHeader 2017-02-19 14:38:38 +08:00
qingwei.li
b7768b1b3c feat(render): add auto header 2017-02-19 14:38:38 +08:00
qingwei.li
fd9c3bd19d docs: update 2017-02-19 14:38:38 +08:00
qingwei.li
e2b7b976cf refactor(core): fix route path 2017-02-19 14:38:38 +08:00
qingwei.li
8cae16539d refactor(core): add scroll event 2017-02-19 14:38:38 +08:00
qingwei.li
27e7e749af refactor(core): and cover 2017-02-19 14:38:38 +08:00
qingwei.li
fbd51afdcb refactor(core): and sidebar event 2017-02-19 14:38:38 +08:00
qingwei.li
fe88c154b0 refactor(core): and markdown compiler 2017-02-19 14:38:38 +08:00
qingwei.li
30da0d5d46 refactor(core): add router 2017-02-19 14:38:38 +08:00
qingwei.li
8bee8f0213 refactor(core): add render 2017-02-19 14:38:38 +08:00
qingwei.li
aad62b65f5 refactor(core): adjust directory structure: 2017-02-19 14:38:38 +08:00
qingwei.li
e07d36f44e Merge branch 'master' of github.com:QingWei-Li/docsify 2017-02-15 20:02:02 +08:00
qingwei.li
5dcd6d43ea -> v2.4.3 2017-02-15 20:01:11 +08:00
qingwei.li
00e3609b25 bump: 2.4.3 2017-02-15 20:01:07 +08:00
qingwei.li
a6d9669bfa docs: update package size 2017-02-15 20:00:56 +08:00
Jintzo
94255e22b1 Correctly link Get Started (#77)
As `## docsify` is the new title of the `README.md`, *Get Started* should link to that.
2017-02-14 17:11:29 +08:00
Song
00983ab796 fix emoji replacing error (#76) 2017-02-14 15:47:04 +08:00
qingwei.li
8e203b07ab -> v2.4.2 2017-02-14 10:23:14 +08:00
qingwei.li
eff6d21539 bump: 2.4.2 2017-02-14 10:23:08 +08:00
qingwei.li
dc536a3930 fix(index): load file path error 2017-02-14 10:22:44 +08:00
qingwei.li
cc4ffb4ab7 -> v2.4.1 2017-02-13 23:23:25 +08:00
qingwei.li
d62da2034f bump: 2.4.1 2017-02-13 23:23:13 +08:00
qingwei.li
dd0c84bb40 fix(index): cover page 2017-02-13 23:21:27 +08:00
qingwei.li
02022af53c -> v2.4.0 2017-02-13 23:08:02 +08:00
qingwei.li
44d7257691 bump: 2.4.0 2017-02-13 23:07:54 +08:00
qingwei.li
c6f760275c feat(hook): add doneEach 2017-02-13 23:06:30 +08:00
qingwei.li
558d73c2a8 -> v2.3.0 2017-02-13 22:52:23 +08:00
qingwei.li
ec8b17bd43 bump 2.3.0 2017-02-13 22:51:31 +08:00
qingwei.li
bf559b44dc fix(render): custom marked renderer 2017-02-13 22:50:49 +08:00
cinwell.li
64bb5befeb Merge pull request #73 from QingWei-Li/feat/alias
2.3.0
2017-02-13 22:47:36 +08:00
qingwei.li
6ed8c2a51b Merge branch 'master' into feat/alias 2017-02-13 22:46:41 +08:00
Liu Yuyang
434e8d1a36 merge marked renderer function instead of overiding it. (#74) 2017-02-13 22:44:43 +08:00
qingwei.li
7c6ab54ba7 docs(en) finish 2017-02-13 22:43:58 +08:00
cinwell.li
287b0a6b30 Merge pull request #75 from liril-net/master
Add dark theme
2017-02-13 21:35:13 +08:00
lirilsu
d98430cdb6 Add dark theme 2017-02-13 19:59:29 +08:00
qingwei.li
68c70509d1 docs(en) init english documents 2017-02-12 22:22:33 +08:00
qingwei.li
784173e4c8 fix(src): get alias 2017-02-12 22:04:29 +08:00
qingwei.li
ce99a04f2e fix(src): get alias 2017-02-12 21:53:38 +08:00
qingwei.li
772972ce60 docs(zh-cn): finish chinese documents 2017-02-12 20:12:36 +08:00
qingwei.li
f89d43ef52 docs(readme): add donate 2017-02-12 16:30:45 +08:00
qingwei.li
a96c2b0103 doc(zh-cn): update all documents 2017-02-12 15:51:26 +08:00
qingwei.li
a866744c45 fix(render): fix render link 2017-02-12 15:45:14 +08:00
qingwei.li
38ea660b78 fix(render): render link 2017-02-12 15:40:22 +08:00
qingwei.li
9e81a5975f feat(hook): support custom plugin 2017-02-12 15:36:46 +08:00
qingwei.li
6f87529256 fix(render): image url 2017-02-12 13:31:53 +08:00
qingwei.li
fa54b52048 fix(themes): fix navbar style 2017-02-12 12:52:48 +08:00
qingwei.li
4864d1b26f fix(themes): update navbar style 2017-02-12 12:51:38 +08:00
qingwei.li
324301aaff fix(src): fix route 2017-02-12 08:43:32 +08:00
qingwei.li
6b30eb65eb feat(src): dynamic title and fix sidebar style 2017-02-11 19:04:12 +08:00
qingwei.li
0ff36c22bb fix(event): has no effect on a FF mobile browser, fixed #67 2017-02-11 14:54:02 +08:00
qingwei.li
19b66904fb docs: add alias 2017-02-11 10:21:38 +08:00
qingwei.li
24412cdaf0 feat(src): add alias feature 2017-02-11 10:17:05 +08:00
qingwei.li
aedf16e433 -> v2.2.1 2017-02-11 09:39:44 +08:00
qingwei.li
41e4cb1b04 bump: 2.2.1 2017-02-11 09:39:31 +08:00
qingwei.li
9d3cc89aa9 fix(search): crash when not content, fixed #68 2017-02-11 09:36:48 +08:00
qingwei.li
50f5fc2b22 fix(event): scroll active sidebar 2017-02-11 09:36:48 +08:00
qingwei.li
3941304fda fix(search): not work in mobile 2017-02-11 09:36:48 +08:00
D.Yang
be6a97af92 add showcase of Mybatis-Plus (#69)
add a showcase
2017-02-10 16:56:05 +08:00
qingwei.li
55323a38b8 docs(changelog): update 2017-02-09 22:18:55 +08:00
qingwei.li
5b25e7daca -> v2.2.0 2017-02-09 22:17:29 +08:00
qingwei.li
a4bd5fd295 bump: 2.2.0 2017-02-09 22:17:23 +08:00
cinwell.li
ac61bb0e75 feat(plugins): add Google Analytics plugin (#66) 2017-02-09 22:16:15 +08:00
142 changed files with 19823 additions and 10329 deletions

5
.eslintignore Normal file
View file

@ -0,0 +1,5 @@
.git
packages/docsify-server-renderer/build.js
node_modules
build
server.js

View file

@ -1,9 +1,20 @@
{
"extends": ["vue"],
"env": {
"browser": true
"extends": "xo-space/browser",
"rules": {
"semi": [2, "never"],
"no-return-assign": "off",
"no-unused-expressions": "off",
"no-new-func": "off",
"no-multi-assign": "off",
"no-mixed-operators": "off",
"max-params": "off",
"no-script-url": "off",
"camelcase": "off",
"no-warning-comments": "off"
},
"globals": {
"$docsify": true
"Docsify": true,
"$docsify": true,
"process": true
}
}

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
---
<!-- Please don't delete this template or we'll close your issue -->
<!-- Please use English language -->
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
<!-- Please ask questions on StackOverflow: https://stackoverflow.com/questions/ask?tags=docsify -->
## Bug Report
#### Steps to reproduce
#### What is current behaviour
#### What is the expected behaviour
#### Other relevant information
<!-- (Update "[ ]" to "[x]" to check a box) -->
- [ ] Bug does still occur when all/other plugins are disabled?
- Your OS:
- Node.js version:
- npm/yarn version:
- Browser version:
- Docsify version:
- Docsify plugins:
<!-- Love docsify? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate -->

View file

@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
---
<!-- Please don't delete this template or we'll close your issue -->
<!-- Please use English language -->
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
<!-- Please ask questions on StackOverflow 👉 https://stackoverflow.com/questions/ask?tags=docsify -->
## Feature request
#### What problem does this feature solve?
#### What does the proposed API look like?
#### How should this be implemented in your opinion?
#### Are you willing to work on this yourself?

54
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,54 @@
<!-- Please use English language -->
<!-- Please don't delete this template -->
<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->
**Summary**
**What kind of change does this PR introduce?** (check at least one)
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Docs
- [ ] Build-related changes
- [ ] Other, please describe:
If changing the UI of default theme, please provide the **before/after** screenshot:
**Does this PR introduce a breaking change?** (check one)
- [ ] Yes
- [ ] No
If yes, please describe the impact and migration path for existing applications:
**The PR fulfills these requirements:**
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
You have tested in the following browsers: (Providing a detailed version will be better.)
- [ ] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Edge
- [ ] IE
If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature
- [ ] Related documents have been updated
- [ ] Related tests have been updated
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
**Other information:**
---
* [ ] DO NOT include files inside `lib` directory.

9
.gitignore vendored
View file

@ -1,4 +1,9 @@
.DS_Store
*.log
.DS_Store
.idea
node_modules
/themes
themes/
lib/
# exceptions
!.gitkeep

5
.npmignore Normal file
View file

@ -0,0 +1,5 @@
.eslintignore
.eslintrc
.github/
.gitignore
.travis.yml

View file

@ -1,6 +1,3 @@
sudo: false
cache:
directories:
- $HOME/.yarn-cache
language: node_js
node_js: stable

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"prettier.eslintIntegration": true
}

View file

@ -1,319 +1,753 @@
## 2.1.0
### Features
- Add search plugin
```html
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
<a name="4.9.4"></a>
## [4.9.4](https://github.com/docsifyjs/docsify/compare/v4.9.2...v4.9.4) (2019-05-05)
### Bug fixes
- fix sidebar style
## 2.0.3
### Bug fixes
- fix: rendering emojis
- fix: css var polyfill
## 2.0.2
<a name="4.9.2"></a>
## [4.9.2](https://github.com/docsifyjs/docsify/compare/v4.9.1...v4.9.2) (2019-04-21)
### Bug fixes
- fix button style in cover page.
## 2.0.1
### Bug fixes
- border style.
### Bug Fixes
## 2.0.0
### Features
- Customize the theme color
* re-render gitalk when router changed ([11ea1f8](https://github.com/docsifyjs/docsify/commit/11ea1f8))
### Break change
- Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs
## 1.10.5
### Bug fixes
- fix initialize the Vue instance
## 1.10.4
### Bug fixes
- fix execute script
## 1.10.3
### Bug fixes
- compatible vuep QingWei-Li/vuep/issues/2
- fix sidebar scroll, fixed #63
## 1.10.2
### Bug fixes
- Fix render emojis again
## 1.10.1
### Bug fixes
- Fix render emojis
## 1.10.0
### Features
- Support emoji :laughing:
## 1.9.0
### Bug fixes
- Destroys the vue instance when the route is changed
### Features
- Add `!>` and `?>` doc helper.
### Break change
- Remove `!` doc helper.
* allows relative path, fixed [#590](https://github.com/docsifyjs/docsify/issues/590) ([31654f1](https://github.com/docsifyjs/docsify/commit/31654f1))
<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))
## 1.8.0
### Bug fixes
- Using `v-pre` skip compilation.
### Features
- Execute script when vue exists.
## 1.7.4
### Bug fixes
- Fix bugs caused by the previous version
* **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))
## 1.7.3
### Bug fixes
- Add `hr` style
- Fixed option is an empty string
## 1.7.2
### Bug fixes
- Fix sidebar click event in mobile browser.
## 1.7.1
### Bug fixes
- Fix sidebar style in mobile browser.
<a name="4.8.6"></a>
## [4.8.6](https://github.com/docsifyjs/docsify/compare/v4.8.5...v4.8.6) (2018-11-12)
## 1.7.0
### Bug fixes
- Fixed custom cover background, fixed #52
- Fixed sticky sidebar
### Bug Fixes
## Features
- Add `name` and `nameLink`
* IE10 compatibility ([#691](https://github.com/docsifyjs/docsify/issues/691)) ([4db8cd6](https://github.com/docsifyjs/docsify/commit/4db8cd6))
## 1.6.1
### Bug fixes
- Fixed sidebar bug when the coverpage exist
## 1.6.0
### Features
- Improve sidebar performance. The active item is automatically scrolled in the visible view.
- New doc helper: `! `. e.g. `! content` will be rendered as `<p class="tip">content</p>`
## 1.5.2
### Bug fixes
- Fixed number at the beginning of the slug
<a name="4.8.5"></a>
## [4.8.5](https://github.com/docsifyjs/docsify/compare/v4.8.4...v4.8.5) (2018-11-02)
## 1.5.1
### Bug fixes
- Remove HTML tag when handling slug
## 1.5.0
### Bug Fixes
### Bug fixes
- Fix slugify.
- Fix nav highlight.
* 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
- Initialize the configuration by `window.$docsify`.
- Markdown parser is configurable.
## 1.4.3
### Bug fixes
- Tweak style.
- add heading config id ([#671](https://github.com/docsifyjs/docsify/issues/671)) ([ab19b13](https://github.com/docsifyjs/docsify/commit/ab19b13))
## 1.4.2
<a name="4.8.1"></a>
### Bug fixes
- Fix toggle button style.
- Support `mailto`, `tel`, etc. href type
- Fix scroll to top.
## [4.8.1](https://github.com/docsifyjs/docsify/compare/v4.8.0...v4.8.1) (2018-10-31)
### Bug Fixes
## 1.4.1
### Bug fixes
- Fix generate slug.
- 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))
## 1.4.0 Happly new year 🎉
### Features
- Display TOC in the custom sidebar, `data-sub-max-level`.
- Custom background in coverpage.
### Bug fixes
- Fix scroll highlight when Vue exist.
- upgrade PrismJS, fixed [#534](https://github.com/docsifyjs/docsify/issues/534) ([4805cb5](https://github.com/docsifyjs/docsify/commit/4805cb5))
## 1.3.5
### Bug fixes
- Fix vue
<a name="4.8.0"></a>
## 1.3.4
### Bug fixes
# [4.8.0](https://github.com/docsifyjs/docsify/compare/v4.7.1...v4.8.0) (2018-10-31)
- Supports [vuep](https://github.com/QingWei-Li/vuep)
### Bug Fixes
## 1.3.3
### Bug fixes
- Fixed cover rendering timing
- 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))
## 1.3.2
### Bug fixes
- Fixed render link
## 1.3.1
### Bug fixes
- Fixed cover page style
- Generate the correct link when rendering the article
## 1.3.0
### Features
- Add cover page
- add `<kbd>` style
- headling can be cliked
### Bug fixes
- sidebar highlight
- 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>
### break change
- Navbar no longer fixed at the top
## [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))
## 1.2.0
### Features
- custom basePath
- custom homepage
## 1.1.7
### Bug fixes
- Optimize progress bar
- 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))
<a name="4.6.9"></a>
## [4.6.9](https://github.com/QingWei-Li/docsify/compare/v4.6.8...v4.6.9) (2018-03-10)
### Bug Fixes
- upgrade medium-zoom, fixed [#417](https://github.com/QingWei-Li/docsify/issues/417) ([6a3d69a](https://github.com/QingWei-Li/docsify/commit/6a3d69a))
<a name="4.6.8"></a>
## [4.6.8](https://github.com/QingWei-Li/docsify/compare/v4.6.7...v4.6.8) (2018-03-06)
### 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))
<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))
<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))
## 1.1.6
### Features
- Add logo 😂
### Bug fixes
- Remove table background color
- Fixed highlight sidebar using chinese ids
- **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)
### 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))
## 1.1.5
### Features
- Add table style
### Bug fixes
- Not fixed position of hte navbar in the mobile browser
- Correct calculation of whether the mobile browser
- **fetch:** Add fallback languages configuration. ([#402](https://github.com/QingWei-Li/docsify/issues/402)) ([ecc0e04](https://github.com/QingWei-Li/docsify/commit/ecc0e04))
## 1.1.4
### Bug fixes
- Fixed chinese auchor link
<a name="4.6.3"></a>
## 1.1.3
### Bug fixes
- Optimize progress bar again
## [4.6.3](https://github.com/QingWei-Li/docsify/compare/v4.6.2...v4.6.3) (2018-02-15)
## 1.1.2
### Bug fixes
- fix failed `auto2top` in mobile
### 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))
## 1.1.1
### Bug fixes
- Optimize progress bar
<a name="4.6.2"></a>
## 1.1.0
## Features
- Add progress bar
- Add `auto2top` option for hash router
## [4.6.2](https://github.com/QingWei-Li/docsify/compare/v4.6.1...v4.6.2) (2018-02-14)
## 1.0.3
### Bug fixes
- Fix cache
### Bug Fixes
## 1.0.2
### Bug fixes
- Fix binding events bug, fixed #24
- Fix regular expression, fixed #23
- **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))
## 1.0.1
### Bug fixes
- `img` style
<a name="4.6.1"></a>
## 1.0.0
## Features
- Support hash router
## [4.6.1](https://github.com/QingWei-Li/docsify/compare/v4.6.0...v4.6.1) (2018-02-12)
### Bug fixes
- Improved scrolling on mobile
### Bug Fixes
## 0.7.0
### Breaking change
- `themes/` was removed, only exists in the npm package.
- **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)
### Bug fixes
- Fix style.
- Fix sidebar animation again.
<a name="4.6.0"></a>
## 0.6.1
### Bug fixes
- In the mobile, it should collapse the sidebar when toggle is clicked.
- Fix the dropdown list style.
- Fix sidebar animation.
# [4.6.0](https://github.com/QingWei-Li/docsify/compare/v4.5.9...v4.6.0) (2018-02-11)
### 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))
## 0.6.0
### Features
- Navbar support dropdown list, #6
- Sidebar with toggle
### Bug fixes
- Fix ineffective option, fixed #10
- 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>
## [4.5.9](https://github.com/QingWei-Li/docsify/compare/v4.5.8...v4.5.9) (2018-02-07)
### Bug Fixes
- upgrade marked ([4157173](https://github.com/QingWei-Li/docsify/commit/4157173))
<a name="4.5.8"></a>
## [4.5.8](https://github.com/QingWei-Li/docsify/compare/v4.5.6...v4.5.8) (2018-02-07)
### 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))
<a name="4.5.7"></a>
## [4.5.7](https://github.com/QingWei-Li/docsify/compare/v4.5.6...v4.5.7) (2017-12-29)
## 0.5.0
### Features
- Custom sidebars and navbars by markdown file
## 0.4.2
### Bug fixes
- Correct catch ajax error
- add navigation plugin, closed [#180](https://github.com/QingWei-Li/docsify/issues/180) ([f78be4c](https://github.com/QingWei-Li/docsify/commit/f78be4c))
## 0.4.1
### Bug fixes
- catch ajax error
<a name="4.5.6"></a>
## [4.5.6](https://github.com/QingWei-Li/docsify/compare/v4.5.3...v4.5.6) (2017-12-14)
### 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))
<a name="4.5.5"></a>
## [4.5.5](https://github.com/QingWei-Li/docsify/compare/v4.5.4...v4.5.5) (2017-11-30)
### 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)
<a name="4.5.4"></a>
## [4.5.4](https://github.com/QingWei-Li/docsify/compare/v4.5.2...v4.5.4) (2017-11-29)
### 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))
## 0.4.0
### Features
- Custom sidebar
### Bug fixes
- Fix undefined language
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
## 0.3.1
### Bug fixes
- Strip HTML tag when rendering the headings
<a name="4.5.3"></a>
## [4.5.3](https://github.com/QingWei-Li/docsify/compare/v4.5.2...v4.5.3) (2017-11-11)
## 0.3.0
### Features
- Add minified css files
- Add max level option
- Add pure.css
## 0.2.1
### Bug fixes
- Fix vue.css
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
## 0.2.0
### Bug fixes
- Fix route
- Remove dynamic title
<a name="4.5.2"></a>
## [4.5.2](https://github.com/QingWei-Li/docsify/compare/v4.5.1...v4.5.2) (2017-11-09)
## 0.1.0
### Features
- Add buble.css
- 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>
## [4.5.1](https://github.com/QingWei-Li/docsify/compare/v4.5.0...v4.5.1) (2017-11-07)
### 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))
<a name="4.5.0"></a>
# [4.5.0](https://github.com/QingWei-Li/docsify/compare/v4.4.1...v4.5.0) (2017-11-04)
### Features
- 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>
## [4.4.1](https://github.com/QingWei-Li/docsify/compare/v4.4.0...v4.4.1) (2017-10-31)
### 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))
<a name="4.4.0"></a>
# [4.4.0](https://github.com/QingWei-Li/docsify/compare/v4.3.15...v4.4.0) (2017-10-30)
### 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))
### 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))
<a name="4.3.15"></a>
## [4.3.15](https://github.com/QingWei-Li/docsify/compare/v4.3.14...v4.3.15) (2017-10-20)
### Bug Fixes
- scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
<a name="4.3.14"></a>
## [4.3.14](https://github.com/QingWei-Li/docsify/compare/v4.3.13...v4.3.14) (2017-10-20)
### Bug Fixes
- codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
<a name="4.3.13"></a>
## [4.3.13](https://github.com/QingWei-Li/docsify/compare/v4.3.12...v4.3.13) (2017-10-17)
### 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))
### Features
- 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>
## [4.3.12](https://github.com/QingWei-Li/docsify/compare/v4.3.11...v4.3.12) (2017-10-15)
### Bug Fixes
- 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>
## [4.3.11](https://github.com/QingWei-Li/docsify/compare/v4.3.10...v4.3.11) (2017-10-15)
### 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))
<a name="4.3.10"></a>
## [4.3.10](https://github.com/QingWei-Li/docsify/compare/v4.3.9...v4.3.10) (2017-10-12)
### 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))
<a name="4.3.9"></a>
## [4.3.9](https://github.com/QingWei-Li/docsify/compare/v4.3.8...v4.3.9) (2017-10-11)
### Bug Fixes
- 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>
## [4.3.8](https://github.com/QingWei-Li/docsify/compare/v4.3.7...v4.3.8) (2017-10-07)
### 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))
<a name="4.3.7"></a>
## [4.3.7](https://github.com/QingWei-Li/docsify/compare/v4.3.6...v4.3.7) (2017-10-02)
### 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))
<a name="4.3.6"></a>
## [4.3.6](https://github.com/QingWei-Li/docsify/compare/v4.3.5...v4.3.6) (2017-09-21)
### Bug Fixes
- style for codesponsor plugin ([08afec7](https://github.com/QingWei-Li/docsify/commit/08afec7))
<a name="4.3.5"></a>
## [4.3.5](https://github.com/QingWei-Li/docsify/compare/v4.3.4...v4.3.5) (2017-09-20)
### Bug Fixes
- 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))
<a name="4.3.4"></a>
## [4.3.4](https://github.com/QingWei-Li/docsify/compare/v4.3.3...v4.3.4) (2017-09-07)
### Bug Fixes
- 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>
## [4.3.3](https://github.com/QingWei-Li/docsify/compare/v4.3.2...v4.3.3) (2017-09-06)
### 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))
### 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))
<a name="4.3.2"></a>
## [4.3.2](https://github.com/QingWei-Li/docsify/compare/v4.3.1...v4.3.2) (2017-09-01)
### Bug Fixes
- 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))
<a name="4.3.1"></a>
## [4.3.1](https://github.com/QingWei-Li/docsify/compare/v4.2.9...v4.3.1) (2017-08-30)
### Features
- **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>
# [4.3.0](https://github.com/QingWei-Li/docsify/compare/v4.2.9...v4.3.0) (2017-08-17)
### Features
- **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>
## [4.2.9](https://github.com/QingWei-Li/docsify/compare/v4.2.8...v4.2.9) (2017-08-15)
### Bug Fixes
- ensure document ready before init Docsify [#233](https://github.com/QingWei-Li/docsify/issues/233)
<a name="4.2.8"></a>
## [4.2.8](https://github.com/QingWei-Li/docsify/compare/v4.2.7...v4.2.8) (2017-08-10)
### 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))
<a name="4.2.7"></a>
## [4.2.7](https://github.com/QingWei-Li/docsify/compare/v4.2.4...v4.2.7) (2017-08-05)
### 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))
<a name="4.2.6"></a>
## [4.2.6](https://github.com/QingWei-Li/docsify/compare/v4.2.4...v4.2.6) (2017-07-27)
### 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))
<a name="4.2.4"></a>
## [4.2.4](https://github.com/QingWei-Li/docsify/compare/v4.2.2...v4.2.4) (2017-07-26)
### 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))
<a name="4.2.3"></a>
## [4.2.3](https://github.com/QingWei-Li/docsify/compare/v4.2.2...v4.2.3) (2017-07-26)
### 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))
<a name="4.2.2"></a>
## [4.2.2](https://github.com/QingWei-Li/docsify/compare/v4.2.1...v4.2.2) (2017-07-24)
### Bug Fixes
- 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)
<a name="4.2.0"></a>
# [4.2.0](https://github.com/QingWei-Li/docsify/compare/v4.1.14...v4.2.0) (2017-07-10)
### Bug Fixes
- 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))
<a name="4.1.14"></a>
## [4.1.14](https://github.com/QingWei-Li/docsify/compare/v4.1.13...v4.1.14) (2017-06-24)
### 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)
### Features
- 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>
## [4.1.13](https://github.com/QingWei-Li/docsify/compare/v4.1.12...v4.1.13) (2017-06-11)
<a name="4.1.12"></a>
## [4.1.12](https://github.com/QingWei-Li/docsify/compare/v4.1.11...v4.1.12) (2017-06-03)
### 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))
<a name="4.1.11"></a>
## [4.1.11](https://github.com/QingWei-Li/docsify/compare/v4.1.10...v4.1.11) (2017-06-02)
### 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))
<a name="4.1.10"></a>
## [4.1.10](https://github.com/QingWei-Li/docsify/compare/v4.1.9...v4.1.10) (2017-06-02)
### Bug Fixes
- **hash:** hash routing crashes when url has querystring ([6d48ce1](https://github.com/QingWei-Li/docsify/commit/6d48ce1))
<a name="4.1.9"></a>
## [4.1.9](https://github.com/QingWei-Li/docsify/compare/v4.1.8...v4.1.9) (2017-05-31)
### 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))
<a name="4.1.8"></a>
## [4.1.8](https://github.com/QingWei-Li/docsify/compare/v4.1.7...v4.1.8) (2017-05-31)
### 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))
### 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))
<a name="4.1.7"></a>
## [4.1.7](https://github.com/QingWei-Li/docsify/compare/v4.1.6...v4.1.7) (2017-05-30)
### Bug Fixes
- **ssr:** clean files ([0014895](https://github.com/QingWei-Li/docsify/commit/0014895))
<a name="4.1.6"></a>
## [4.1.6](https://github.com/QingWei-Li/docsify/compare/v4.1.5...v4.1.6) (2017-05-30)
### Bug Fixes
- **ssr:** add debug ([6b9e092](https://github.com/QingWei-Li/docsify/commit/6b9e092))
<a name="4.1.5"></a>
## [4.1.5](https://github.com/QingWei-Li/docsify/compare/v4.1.4...v4.1.5) (2017-05-30)
### Bug Fixes
- **ssr:** missing package ([6db8c9e](https://github.com/QingWei-Li/docsify/commit/6db8c9e))
<a name="4.1.4"></a>
## [4.1.4](https://github.com/QingWei-Li/docsify/compare/v4.1.3...v4.1.4) (2017-05-30)
### Bug Fixes
- **ssr:** file path ([79a83bc](https://github.com/QingWei-Li/docsify/commit/79a83bc))
<a name="4.1.3"></a>
## [4.1.3](https://github.com/QingWei-Li/docsify/compare/v4.1.2...v4.1.3) (2017-05-30)
### Bug Fixes
- update babel config ([9825db4](https://github.com/QingWei-Li/docsify/commit/9825db4))
<a name="4.1.2"></a>
## [4.1.2](https://github.com/QingWei-Li/docsify/compare/v4.1.1...v4.1.2) (2017-05-30)
### Bug Fixes
- update babel config ([80dba19](https://github.com/QingWei-Li/docsify/commit/80dba19))
<a name="4.1.1"></a>
## [4.1.1](https://github.com/QingWei-Li/docsify/compare/v4.1.0...v4.1.1) (2017-05-30)
### 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))
<a name="4.1.0"></a>
# [4.1.0](https://github.com/QingWei-Li/docsify/compare/v4.0.2...v4.1.0) (2017-05-30)
<a name="4.0.2"></a>
## [4.0.2](https://github.com/QingWei-Li/docsify/compare/v4.0.1...v4.0.2) (2017-05-30)
### Bug Fixes
- basePath for history mode ([fc1cd3f](https://github.com/QingWei-Li/docsify/commit/fc1cd3f))
<a name="4.0.1"></a>
## [4.0.1](https://github.com/QingWei-Li/docsify/compare/v4.0.0...v4.0.1) (2017-05-29)
### Bug Fixes
- **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>
# [4.0.0](https://github.com/QingWei-Li/docsify/compare/v3.7.3...v4.0.0) (2017-05-29)
### 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))
### 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))

67
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,67 @@
# Contribute
## Introduction
First, thank you for considering contributing to docsify! It's people like you that make the open source community such a great community! 😊
We welcome any type of contribution, not only code. You can help with
- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- **Marketing**: writing blog posts, howto's, printing stickers, ...
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/docsify).
## Your First Contribution
Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
## Submitting code
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
## Code review process
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
## Financial contributions
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/docsify).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
## Questions
If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
You can also reach us at hello@docsify.opencollective.com.
## Credits
### Contributors
Thank you to all the people who have already contributed to docsify!
<a href="graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
### Backers
Thank you to all our backers! [[Become a backer](https://opencollective.com/docsify#backer)]
<a href="https://opencollective.com/docsify#backers" target="_blank"><img src="https://opencollective.com/docsify/backers.svg?width=890"></a>
### Sponsors
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/docsify#sponsor))
<a href="https://opencollective.com/docsify/sponsor/0/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/1/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/2/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/3/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/4/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/5/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/6/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/7/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/8/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/docsify/sponsor/9/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/9/avatar.svg"></a>
<!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->

736
HISTORY.md Normal file
View file

@ -0,0 +1,736 @@
<a name="3.7.3"></a>
## [3.7.3](https://github.com/QingWei-Li/docsify/compare/v3.7.2...v3.7.3) (2017-05-22)
### Bug Fixes
* **render:** find => filter ([eca3368](https://github.com/QingWei-Li/docsify/commit/eca3368))
<a name="3.7.2"></a>
## [3.7.2](https://github.com/QingWei-Li/docsify/compare/v3.7.1...v3.7.2) (2017-05-19)
<a name="3.7.1"></a>
## [3.7.1](https://github.com/QingWei-Li/docsify/compare/v3.7.0...v3.7.1) (2017-05-19)
### Bug Fixes
* docsify-updated is undefined ([b2b4742](https://github.com/QingWei-Li/docsify/commit/b2b4742))
<a name="3.7.0"></a>
# [3.7.0](https://github.com/QingWei-Li/docsify/compare/v3.6.6...v3.7.0) (2017-05-16)
### Features
* add docsify-updated, close [#158](https://github.com/QingWei-Li/docsify/issues/158) ([d2be5ae](https://github.com/QingWei-Li/docsify/commit/d2be5ae))
* add externalLinkTarget, close [#149](https://github.com/QingWei-Li/docsify/issues/149) ([2d73285](https://github.com/QingWei-Li/docsify/commit/2d73285))
<a name="3.6.6"></a>
## [3.6.6](https://github.com/QingWei-Li/docsify/compare/v3.6.5...v3.6.6) (2017-05-06)
### Features
* support query string for the search, fixed [#156](https://github.com/QingWei-Li/docsify/issues/156) ([da75d70](https://github.com/QingWei-Li/docsify/commit/da75d70))
<a name="3.6.5"></a>
## [3.6.5](https://github.com/QingWei-Li/docsify/compare/v3.6.4...v3.6.5) (2017-04-28)
### Bug Fixes
* **util:** fix crash, fixed [#154](https://github.com/QingWei-Li/docsify/issues/154) ([51832d3](https://github.com/QingWei-Li/docsify/commit/51832d3))
<a name="3.6.4"></a>
## [3.6.4](https://github.com/QingWei-Li/docsify/compare/v3.6.3...v3.6.4) (2017-04-28)
### Bug Fixes
* **util:** correctly clean up duplicate slashes, fixed [#153](https://github.com/QingWei-Li/docsify/issues/153) ([76c041a](https://github.com/QingWei-Li/docsify/commit/76c041a))
<a name="3.6.3"></a>
## [3.6.3](https://github.com/QingWei-Li/docsify/compare/v3.6.2...v3.6.3) (2017-04-25)
### Bug Fixes
* **external-script:** script attrs ([2653849](https://github.com/QingWei-Li/docsify/commit/2653849))
<a name="3.6.2"></a>
## [3.6.2](https://github.com/QingWei-Li/docsify/compare/v3.6.0...v3.6.2) (2017-04-12)
### Features
* **event:** Collapse the sidebar when click outside element in the small screen ([9b7e5f5](https://github.com/QingWei-Li/docsify/commit/9b7e5f5))
* **external-script:** detect more than one script dom, fixed [#146](https://github.com/QingWei-Li/docsify/issues/146) ([94d6603](https://github.com/QingWei-Li/docsify/commit/94d6603))
<a name="3.6.0"></a>
# [3.6.0](https://github.com/QingWei-Li/docsify/compare/v3.5.2...v3.6.0) (2017-04-09)
### Features
* **render:** add mergeNavbar option, close [#125](https://github.com/QingWei-Li/docsify/issues/125), [#124](https://github.com/QingWei-Li/docsify/issues/124) ([#145](https://github.com/QingWei-Li/docsify/issues/145)) ([9220523](https://github.com/QingWei-Li/docsify/commit/9220523))
<a name="3.5.2"></a>
## [3.5.2](https://github.com/QingWei-Li/docsify/compare/v3.5.1...v3.5.2) (2017-04-05)
<a name="3.5.1"></a>
## [3.5.1](https://github.com/QingWei-Li/docsify/compare/v3.5.0...v3.5.1) (2017-03-25)
### Bug Fixes
* .md file extension regex ([594299f](https://github.com/QingWei-Li/docsify/commit/594299f))
<a name="3.5.0"></a>
# [3.5.0](https://github.com/QingWei-Li/docsify/compare/v3.4.4...v3.5.0) (2017-03-25)
### Bug Fixes
* adjust display on small screens ([bf35471](https://github.com/QingWei-Li/docsify/commit/bf35471))
* navbar labels for German ([b022aaf](https://github.com/QingWei-Li/docsify/commit/b022aaf))
### Features
* **route:** auto remove .md extension ([8f11653](https://github.com/QingWei-Li/docsify/commit/8f11653))
<a name="3.4.4"></a>
## [3.4.4](https://github.com/QingWei-Li/docsify/compare/v3.4.3...v3.4.4) (2017-03-17)
### Bug Fixes
* **search:** fix input style ([2d6a51b](https://github.com/QingWei-Li/docsify/commit/2d6a51b))
<a name="3.4.3"></a>
## [3.4.3](https://github.com/QingWei-Li/docsify/compare/v3.4.2...v3.4.3) (2017-03-16)
<a name="3.4.2"></a>
## [3.4.2](https://github.com/QingWei-Li/docsify/compare/v3.4.1...v3.4.2) (2017-03-11)
### Features
* **emojify:** add no-emoji option ([3aef37a](https://github.com/QingWei-Li/docsify/commit/3aef37a))
<a name="3.4.1"></a>
## [3.4.1](https://github.com/QingWei-Li/docsify/compare/v3.4.0...v3.4.1) (2017-03-10)
### Bug Fixes
* **dom:** Disable the dom cache when vue is present, fixed [#119](https://github.com/QingWei-Li/docsify/issues/119) ([b9a7275](https://github.com/QingWei-Li/docsify/commit/b9a7275))
<a name="3.4.0"></a>
# [3.4.0](https://github.com/QingWei-Li/docsify/compare/v3.3.0...v3.4.0) (2017-03-09)
### Features
* **zoom-image:** add plugin ([50fa6fc](https://github.com/QingWei-Li/docsify/commit/50fa6fc))
<a name="3.3.0"></a>
# [3.3.0](https://github.com/QingWei-Li/docsify/compare/v3.2.0...v3.3.0) (2017-03-07)
<a name="3.2.0"></a>
# [3.2.0](https://github.com/QingWei-Li/docsify/compare/v3.1.2...v3.2.0) (2017-02-28)
### Bug Fixes
* **fetch:** load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100) ([f3fc596](https://github.com/QingWei-Li/docsify/commit/f3fc596))
* **render:** Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106) ([0d59ee9](https://github.com/QingWei-Li/docsify/commit/0d59ee9))
### Features
* **search:** Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103) ([d3c9fbd](https://github.com/QingWei-Li/docsify/commit/d3c9fbd))
<a name="3.1.2"></a>
## [3.1.2](https://github.com/QingWei-Li/docsify/compare/v3.1.1...v3.1.2) (2017-02-27)
<a name="3.1.1"></a>
## [3.1.1](https://github.com/QingWei-Li/docsify/compare/v3.1.0...v3.1.1) (2017-02-24)
### Bug Fixes
* **render:** custom cover background image ([8f9bf29](https://github.com/QingWei-Li/docsify/commit/8f9bf29))
* **search:** don't search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102) ([507d9e8](https://github.com/QingWei-Li/docsify/commit/507d9e8))
* **tpl:** extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101) ([d67d25f](https://github.com/QingWei-Li/docsify/commit/d67d25f))
<a name="3.1.0"></a>
# [3.1.0](https://github.com/QingWei-Li/docsify/compare/v3.0.5...v3.1.0) (2017-02-22)
### Bug Fixes
* **search:** incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90) ([b8a3d8f](https://github.com/QingWei-Li/docsify/commit/b8a3d8f))
* **sw:** update white list ([f2975a5](https://github.com/QingWei-Li/docsify/commit/f2975a5))
### Features
* **emoji:** add emoji plugin ([855c450](https://github.com/QingWei-Li/docsify/commit/855c450))
<a name="3.0.5"></a>
## [3.0.5](https://github.com/QingWei-Li/docsify/compare/v3.0.4...v3.0.5) (2017-02-21)
### Bug Fixes
* **event:** highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86) ([2a1157a](https://github.com/QingWei-Li/docsify/commit/2a1157a))
* **gen-tree:** cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88) ([3394ebb](https://github.com/QingWei-Li/docsify/commit/3394ebb))
* **layout.css:** loading style ([42b2dba](https://github.com/QingWei-Li/docsify/commit/42b2dba))
### Features
* **pwa:** add sw.js ([f7111b5](https://github.com/QingWei-Li/docsify/commit/f7111b5))
<a name="3.0.4"></a>
## [3.0.4](https://github.com/QingWei-Li/docsify/compare/v3.0.3...v3.0.4) (2017-02-20)
### Bug Fixes
* **render:** disable rendering sub list when loadSidebar is false ([35dd2e1](https://github.com/QingWei-Li/docsify/commit/35dd2e1))
* **render:** execute script ([780c1e5](https://github.com/QingWei-Li/docsify/commit/780c1e5))
<a name="3.0.3"></a>
## [3.0.3](https://github.com/QingWei-Li/docsify/compare/v3.0.2...v3.0.3) (2017-02-19)
<a name="3.0.2"></a>
## [3.0.2](https://github.com/QingWei-Li/docsify/compare/v3.0.1...v3.0.2) (2017-02-19)
### Bug Fixes
* **compiler:** link ([3b127a1](https://github.com/QingWei-Li/docsify/commit/3b127a1))
* **search:** add lazy input ([bf593a7](https://github.com/QingWei-Li/docsify/commit/bf593a7))
<a name="3.0.1"></a>
## [3.0.1](https://github.com/QingWei-Li/docsify/compare/v3.0.0...v3.0.1) (2017-02-19)
### Bug Fixes
* **route:** empty alias ([cd99b52](https://github.com/QingWei-Li/docsify/commit/cd99b52))
<a name="3.0.0"></a>
# [3.0.0](https://github.com/QingWei-Li/docsify/compare/v2.4.3...v3.0.0) (2017-02-19)
### Bug Fixes
* **compiler:** link ([c7e09c3](https://github.com/QingWei-Li/docsify/commit/c7e09c3))
* **render:** support html file ([7b6a2ac](https://github.com/QingWei-Li/docsify/commit/7b6a2ac))
* **search:** escape html ([fcb66e8](https://github.com/QingWei-Li/docsify/commit/fcb66e8))
* **search:** fix default config ([2efd859](https://github.com/QingWei-Li/docsify/commit/2efd859))
### Features
* **front-matter:** add front matter[WIP] ([dbb9278](https://github.com/QingWei-Li/docsify/commit/dbb9278))
* **render:** add auto header ([b7768b1](https://github.com/QingWei-Li/docsify/commit/b7768b1))
* **search:** Localization for search placeholder, close [#80](https://github.com/QingWei-Li/docsify/issues/80) ([2351c3e](https://github.com/QingWei-Li/docsify/commit/2351c3e))
* **themes:** add loading info ([86594a3](https://github.com/QingWei-Li/docsify/commit/86594a3))
<a name="2.4.3"></a>
## [2.4.3](https://github.com/QingWei-Li/docsify/compare/v2.4.2...v2.4.3) (2017-02-15)
<a name="2.4.2"></a>
## [2.4.2](https://github.com/QingWei-Li/docsify/compare/v2.4.1...v2.4.2) (2017-02-14)
### Bug Fixes
* **index:** load file path error ([dc536a3](https://github.com/QingWei-Li/docsify/commit/dc536a3))
<a name="2.4.1"></a>
## [2.4.1](https://github.com/QingWei-Li/docsify/compare/v2.4.0...v2.4.1) (2017-02-13)
### Bug Fixes
* **index:** cover page ([dd0c84b](https://github.com/QingWei-Li/docsify/commit/dd0c84b))
<a name="2.4.0"></a>
# [2.4.0](https://github.com/QingWei-Li/docsify/compare/v2.3.0...v2.4.0) (2017-02-13)
### Features
* **hook:** add doneEach ([c6f7602](https://github.com/QingWei-Li/docsify/commit/c6f7602))
<a name="2.3.0"></a>
# [2.3.0](https://github.com/QingWei-Li/docsify/compare/v2.2.1...v2.3.0) (2017-02-13)
### Bug Fixes
* **event:** has no effect on a FF mobile browser, fixed [#67](https://github.com/QingWei-Li/docsify/issues/67) ([0ff36c2](https://github.com/QingWei-Li/docsify/commit/0ff36c2))
* **render:** custom marked renderer ([bf559b4](https://github.com/QingWei-Li/docsify/commit/bf559b4))
* **render:** fix render link ([a866744](https://github.com/QingWei-Li/docsify/commit/a866744))
* **render:** image url ([6f87529](https://github.com/QingWei-Li/docsify/commit/6f87529))
* **render:** render link ([38ea660](https://github.com/QingWei-Li/docsify/commit/38ea660))
* **src:** fix route ([324301a](https://github.com/QingWei-Li/docsify/commit/324301a))
* **src:** get alias ([784173e](https://github.com/QingWei-Li/docsify/commit/784173e))
* **src:** get alias ([ce99a04](https://github.com/QingWei-Li/docsify/commit/ce99a04))
* **themes:** fix navbar style ([fa54b52](https://github.com/QingWei-Li/docsify/commit/fa54b52))
* **themes:** update navbar style ([4864d1b](https://github.com/QingWei-Li/docsify/commit/4864d1b))
### Features
* **hook:** support custom plugin ([9e81a59](https://github.com/QingWei-Li/docsify/commit/9e81a59))
* **src:** add alias feature ([24412cd](https://github.com/QingWei-Li/docsify/commit/24412cd))
* **src:** dynamic title and fix sidebar style ([6b30eb6](https://github.com/QingWei-Li/docsify/commit/6b30eb6))
<a name="2.2.1"></a>
## [2.2.1](https://github.com/QingWei-Li/docsify/compare/v2.2.0...v2.2.1) (2017-02-11)
### Bug Fixes
* **event:** scroll active sidebar ([50f5fc2](https://github.com/QingWei-Li/docsify/commit/50f5fc2))
* **search:** crash when not content, fixed [#68](https://github.com/QingWei-Li/docsify/issues/68) ([9d3cc89](https://github.com/QingWei-Li/docsify/commit/9d3cc89))
* **search:** not work in mobile ([3941304](https://github.com/QingWei-Li/docsify/commit/3941304))
<a name="2.2.0"></a>
# [2.2.0](https://github.com/QingWei-Li/docsify/compare/v2.1.0...v2.2.0) (2017-02-09)
### Features
* **plugins:** add Google Analytics plugin ([#66](https://github.com/QingWei-Li/docsify/issues/66)) ([ac61bb0](https://github.com/QingWei-Li/docsify/commit/ac61bb0))
<a name="2.1.0"></a>
# [2.1.0](https://github.com/QingWei-Li/docsify/compare/v2.0.3...v2.1.0) (2017-02-09)
### Bug Fixes
* render name ([12e2479](https://github.com/QingWei-Li/docsify/commit/12e2479))
* **vue.css:** update sidebar style ([fc140ef](https://github.com/QingWei-Li/docsify/commit/fc140ef))
### Features
* add search, close [#43](https://github.com/QingWei-Li/docsify/issues/43) ([eb5ff3e](https://github.com/QingWei-Li/docsify/commit/eb5ff3e))
<a name="2.0.3"></a>
## [2.0.3](https://github.com/QingWei-Li/docsify/compare/v2.0.2...v2.0.3) (2017-02-07)
### Bug Fixes
* css var polyfill ([8cd386a](https://github.com/QingWei-Li/docsify/commit/8cd386a))
* css var polyfill ([cbaee21](https://github.com/QingWei-Li/docsify/commit/cbaee21))
* rendering emojis ([8c7e4d7](https://github.com/QingWei-Li/docsify/commit/8c7e4d7))
<a name="2.0.2"></a>
## [2.0.2](https://github.com/QingWei-Li/docsify/compare/v2.0.1...v2.0.2) (2017-02-05)
### Bug Fixes
* button style in cover page ([4470855](https://github.com/QingWei-Li/docsify/commit/4470855))
<a name="2.0.1"></a>
## [2.0.1](https://github.com/QingWei-Li/docsify/compare/v2.0.0...v2.0.1) (2017-02-05)
<a name="2.0.0"></a>
# [2.0.0](https://github.com/QingWei-Li/docsify/compare/v1.10.5...v2.0.0) (2017-02-05)
### Features
* customize the theme color ([5cc9f05](https://github.com/QingWei-Li/docsify/commit/5cc9f05))
<a name="1.10.5"></a>
## [1.10.5](https://github.com/QingWei-Li/docsify/compare/v1.10.4...v1.10.5) (2017-01-28)
<a name="1.10.4"></a>
## [1.10.4](https://github.com/QingWei-Li/docsify/compare/v1.10.3...v1.10.4) (2017-01-27)
<a name="1.10.3"></a>
## [1.10.3](https://github.com/QingWei-Li/docsify/compare/v1.10.2...v1.10.3) (2017-01-27)
<a name="1.10.2"></a>
## [1.10.2](https://github.com/QingWei-Li/docsify/compare/v1.10.1...v1.10.2) (2017-01-25)
<a name="1.10.1"></a>
## [1.10.1](https://github.com/QingWei-Li/docsify/compare/v1.10.0...v1.10.1) (2017-01-25)
<a name="1.10.0"></a>
# [1.10.0](https://github.com/QingWei-Li/docsify/compare/v1.9.0...v1.10.0) (2017-01-25)
<a name="1.9.0"></a>
# [1.9.0](https://github.com/QingWei-Li/docsify/compare/v1.8.0...v1.9.0) (2017-01-24)
<a name="1.8.0"></a>
# [1.8.0](https://github.com/QingWei-Li/docsify/compare/v1.7.4...v1.8.0) (2017-01-24)
<a name="1.7.4"></a>
## [1.7.4](https://github.com/QingWei-Li/docsify/compare/v1.7.3...v1.7.4) (2017-01-13)
<a name="1.7.3"></a>
## [1.7.3](https://github.com/QingWei-Li/docsify/compare/v1.7.2...v1.7.3) (2017-01-13)
<a name="1.7.2"></a>
## [1.7.2](https://github.com/QingWei-Li/docsify/compare/v1.7.1...v1.7.2) (2017-01-12)
<a name="1.7.1"></a>
## [1.7.1](https://github.com/QingWei-Li/docsify/compare/v1.7.0...v1.7.1) (2017-01-12)
<a name="1.7.0"></a>
# [1.7.0](https://github.com/QingWei-Li/docsify/compare/v1.6.1...v1.7.0) (2017-01-12)
<a name="1.6.1"></a>
## [1.6.1](https://github.com/QingWei-Li/docsify/compare/v1.6.0...v1.6.1) (2017-01-10)
<a name="1.6.0"></a>
# [1.6.0](https://github.com/QingWei-Li/docsify/compare/v1.5.2...v1.6.0) (2017-01-10)
<a name="1.5.2"></a>
## [1.5.2](https://github.com/QingWei-Li/docsify/compare/v1.5.1...v1.5.2) (2017-01-10)
<a name="1.5.1"></a>
## [1.5.1](https://github.com/QingWei-Li/docsify/compare/v1.5.0...v1.5.1) (2017-01-09)
<a name="1.5.0"></a>
# [1.5.0](https://github.com/QingWei-Li/docsify/compare/v1.4.3...v1.5.0) (2017-01-04)
### Features
* Markdown parser is configurable, [#42](https://github.com/QingWei-Li/docsify/issues/42) ([8b1000a](https://github.com/QingWei-Li/docsify/commit/8b1000a))
<a name="1.4.3"></a>
## [1.4.3](https://github.com/QingWei-Li/docsify/compare/v1.4.2...v1.4.3) (2017-01-01)
<a name="1.4.2"></a>
## [1.4.2](https://github.com/QingWei-Li/docsify/compare/v1.4.1...v1.4.2) (2016-12-31)
<a name="1.4.1"></a>
## [1.4.1](https://github.com/QingWei-Li/docsify/compare/v1.4.0...v1.4.1) (2016-12-31)
<a name="1.4.0"></a>
# [1.4.0](https://github.com/QingWei-Li/docsify/compare/v1.3.5...v1.4.0) (2016-12-31)
<a name="1.3.5"></a>
## [1.3.5](https://github.com/QingWei-Li/docsify/compare/v1.3.4...v1.3.5) (2016-12-25)
<a name="1.3.4"></a>
## [1.3.4](https://github.com/QingWei-Li/docsify/compare/v1.3.3...v1.3.4) (2016-12-25)
<a name="1.3.3"></a>
## [1.3.3](https://github.com/QingWei-Li/docsify/compare/v1.3.2...v1.3.3) (2016-12-23)
<a name="1.3.2"></a>
## [1.3.2](https://github.com/QingWei-Li/docsify/compare/v1.3.1...v1.3.2) (2016-12-22)
<a name="1.3.1"></a>
## [1.3.1](https://github.com/QingWei-Li/docsify/compare/v1.3.0...v1.3.1) (2016-12-22)
<a name="1.3.0"></a>
# [1.3.0](https://github.com/QingWei-Li/docsify/compare/v1.2.0...v1.3.0) (2016-12-21)
<a name="1.2.0"></a>
# [1.2.0](https://github.com/QingWei-Li/docsify/compare/v1.1.7...v1.2.0) (2016-12-20)
<a name="1.1.7"></a>
## [1.1.7](https://github.com/QingWei-Li/docsify/compare/v1.1.6...v1.1.7) (2016-12-19)
<a name="1.1.6"></a>
## [1.1.6](https://github.com/QingWei-Li/docsify/compare/v1.1.5...v1.1.6) (2016-12-18)
<a name="1.1.5"></a>
## [1.1.5](https://github.com/QingWei-Li/docsify/compare/v1.1.4...v1.1.5) (2016-12-18)
<a name="1.1.4"></a>
## [1.1.4](https://github.com/QingWei-Li/docsify/compare/v1.1.3...v1.1.4) (2016-12-17)
<a name="1.1.3"></a>
## [1.1.3](https://github.com/QingWei-Li/docsify/compare/v1.1.2...v1.1.3) (2016-12-17)
<a name="1.1.2"></a>
## [1.1.2](https://github.com/QingWei-Li/docsify/compare/v1.1.1...v1.1.2) (2016-12-17)
<a name="1.1.1"></a>
## [1.1.1](https://github.com/QingWei-Li/docsify/compare/v1.1.0...v1.1.1) (2016-12-17)
<a name="1.1.0"></a>
# [1.1.0](https://github.com/QingWei-Li/docsify/compare/v1.0.3...v1.1.0) (2016-12-16)
<a name="1.0.3"></a>
## [1.0.3](https://github.com/QingWei-Li/docsify/compare/v1.0.2...v1.0.3) (2016-12-13)
<a name="1.0.2"></a>
## [1.0.2](https://github.com/QingWei-Li/docsify/compare/v1.0.1...v1.0.2) (2016-12-13)
<a name="1.0.1"></a>
## [1.0.1](https://github.com/QingWei-Li/docsify/compare/v1.0.0...v1.0.1) (2016-12-08)
<a name="1.0.0"></a>
# [1.0.0](https://github.com/QingWei-Li/docsify/compare/v0.7.0...v1.0.0) (2016-12-08)
<a name="0.7.0"></a>
# [0.7.0](https://github.com/QingWei-Li/docsify/compare/v0.6.1...v0.7.0) (2016-11-30)
<a name="0.6.1"></a>
## [0.6.1](https://github.com/QingWei-Li/docsify/compare/v0.6.0...v0.6.1) (2016-11-29)
<a name="0.6.0"></a>
# [0.6.0](https://github.com/QingWei-Li/docsify/compare/v0.5.0...v0.6.0) (2016-11-29)
<a name="0.5.0"></a>
# [0.5.0](https://github.com/QingWei-Li/docsify/compare/v0.4.2...v0.5.0) (2016-11-28)
<a name="0.4.2"></a>
## [0.4.2](https://github.com/QingWei-Li/docsify/compare/v0.4.1...v0.4.2) (2016-11-28)
<a name="0.4.1"></a>
## [0.4.1](https://github.com/QingWei-Li/docsify/compare/v0.4.0...v0.4.1) (2016-11-28)
<a name="0.4.0"></a>
# [0.4.0](https://github.com/QingWei-Li/docsify/compare/v0.3.1...v0.4.0) (2016-11-27)
### Features
* custom sidebar, [#4](https://github.com/QingWei-Li/docsify/issues/4) ([#5](https://github.com/QingWei-Li/docsify/issues/5)) ([37e7984](https://github.com/QingWei-Li/docsify/commit/37e7984))
<a name="0.3.1"></a>
## [0.3.1](https://github.com/QingWei-Li/docsify/compare/v0.3.0...v0.3.1) (2016-11-27)
<a name="0.3.0"></a>
# [0.3.0](https://github.com/QingWei-Li/docsify/compare/v0.2.1...v0.3.0) (2016-11-27)
<a name="0.2.1"></a>
## [0.2.1](https://github.com/QingWei-Li/docsify/compare/v0.2.0...v0.2.1) (2016-11-26)
<a name="0.2.0"></a>
# [0.2.0](https://github.com/QingWei-Li/docsify/compare/v0.1.0...v0.2.0) (2016-11-26)
<a name="0.1.0"></a>
# [0.1.0](https://github.com/QingWei-Li/docsify/compare/v0.0.5...v0.1.0) (2016-11-26)
<a name="0.0.5"></a>
## [0.0.5](https://github.com/QingWei-Li/docsify/compare/v0.0.4...v0.0.5) (2016-11-24)
<a name="0.0.4"></a>
## [0.0.4](https://github.com/QingWei-Li/docsify/compare/v0.0.3...v0.0.4) (2016-11-22)
<a name="0.0.3"></a>
## [0.0.3](https://github.com/QingWei-Li/docsify/compare/v0.0.2...v0.0.3) (2016-11-20)
<a name="0.0.2"></a>
## [0.0.2](https://github.com/QingWei-Li/docsify/compare/v0.0.1...v0.0.2) (2016-11-20)
<a name="0.0.1"></a>
## 0.0.1 (2016-11-20)

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2016 - 2017 cinwell.li
Copyright (c) 2016 - present cinwell.li
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

118
README.md
View file

@ -1,6 +1,6 @@
<p align="center">
<a href="https://docsify.js.org">
<img alt="docsify" src="./media/docsify.png">
<img alt="docsify" src="./docs/_media/icon.svg">
</a>
</p>
@ -9,61 +9,60 @@
</p>
<p align="center">
<a href="https://travis-ci.org/QingWei-Li/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square"></a>
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a>
<a href="#sponsors"><img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
<a href="https://travis-ci.org/docsifyjs/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/docsifyjs/docsify/master.svg?style=flat-square"></a>
<a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a>
<a href="https://github.com/vuejs/vue"><img alt="code style" src="https://img.shields.io/badge/code%20style-vue-orange.svg?style=flat-square"></a>
<a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a>
<a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a>
</p>
<p align="center">Gold Sponsor via <a href="https://opencollective.com/docsify">Open Collective</a></p>
<p align="center">
<a href="https://opencollective.com/docsify/order/3254">
<img src="https://opencollective.com/docsify/tiers/gold-sponsor.svg?avatarHeight=36">
</a>
</p>
## Links
- [`develop` branch preview](https://docsifyjs.netlify.com/)
- [Documentation](https://docsify.js.org)
- [CLI](https://github.com/QingWei-Li/docsify-cli)
- [CLI](https://github.com/docsifyjs/docsify-cli)
- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
- [Awesome docsify](https://github.com/docsifyjs/awesome-docsify)
- [Community chat](https://gitter.im/docsifyjs/Lobby)
## Features
- Simple and lightweight (~13kB gzipped)
- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Not build static html files
- Support emoji :laughing:
- Useful plugin API
- Compatible with IE11
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
- Support embedded files
## Quick start
Create a `index.html`.
index.html
Look at [this tutorial](https://docsify.js.org/#/quickstart)
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify"></script>
</html>
```
## CDN
- UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/)
- jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify)
## Browser Support
Modern browsers and Internet Explorer 9+.
[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)
## Showcase
These open-source projects are using docsify to generate their sites. Pull requests welcome : )
- [docsify](https://docsify.js.org) - A magical documentation site generator.
- [Snipaste](https://docs.snipaste.com/) - A new way to boost your productivity.
- [puck](https://puck.zz173.com/) - A small & magical php framework.
- [Samaritan](http://samaritan.stockdb.org) - An Algorithmic Trading Framework for Digital Currency.
- [Vudash](http://vudash.github.io/vudash/) - Powerful, Flexible, Open Source dashboards for anything
- [Trilogy](http://trilogy.js.org) - No-hassle SQLite with a Promise-based, document store style API.
These projects are using docsify to generate their sites. Pull requests welcome :blush:
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
## Similar projects
- [docute](https://github.com/egoist/docute) - 📜 Effortlessly documentation done right
- [docpress](https://github.com/docpress/docpress) - Documentation website generator
| Project | Description |
| ------------------------------------------------ | ---------------------------------------- |
| [docute](https://github.com/egoist/docute) | 📜 Effortlessly documentation done right |
| [docpress](https://github.com/docpress/docpress) | Documentation website generator |
## Contributing
@ -71,25 +70,42 @@ These open-source projects are using docsify to generate their sites. Pull reque
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
- Push to the branch: `git push origin my-new-feature`
- Submit a pull request :D
- Submit a pull request
## Development
### prepare
```bash
npm i && npm run dev
open http://localhost:3000
npm run bootstrap && npm run dev
```
### More Language Highlight
## Backers
```html
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.js"></script>
<script src="//unpkg.com/prismjs/components/prism-php.js"></script>
```
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/docsify#backers)]
<a href="https://opencollective.com/docsify#backers" target="_blank"><img src="https://opencollective.com/docsify/backers.svg?width=890"></a>
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/docsify#silver-sponsors)]
<a href="https://opencollective.com/docsify/silver-sponsors/0/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/0/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/1/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/1/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/2/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/2/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/3/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/3/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/4/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/4/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/5/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/5/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/6/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/6/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/7/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/7/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/8/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/8/avatar.svg"></a>
<a href="https://opencollective.com/docsify/silver-sponsors/9/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/9/avatar.svg"></a>
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/docsifyjs/docsify/graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
## License
MIT
[MIT](LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)

12
app.js
View file

@ -1,12 +0,0 @@
var serveStatic = require('serve-static')
var http = require('http')
var fs = require('fs')
http.createServer(function (req, res) {
serveStatic('.')(req, res, function () {
res.writeHead(404, { 'Content-Type': 'text/html' })
res.end(fs.readFileSync('dev.html'))
})
}).listen(3000, '0.0.0.0')
console.log(`\nListening at http://0.0.0.0:3000\n`)

View file

@ -1,47 +0,0 @@
var fs = require('fs')
var cssnano = require('cssnano').process
var resolve = require('path').resolve
var postcss = require('postcss')
var isProd = process.argv[process.argv.length - 1] !== '--dev'
var processor = postcss([require('postcss-salad')({
features: {
precss: {
properties: {
preserve: true
}
}
}
})])
var saveMin = function (file, content) {
fs.writeFileSync(resolve(__dirname, '../lib/themes/', file), content)
}
var save = function (file, content) {
fs.writeFileSync(resolve(__dirname, '../themes/', file), content)
}
var load = function (file) {
return fs.readFileSync(resolve(__dirname, '../src/themes/', file)).toString()
}
var loadLib = function (file) {
return fs.readFileSync(resolve(__dirname, '../themes/', file)).toString()
}
var list = fs.readdirSync(resolve(__dirname, '../src/themes'))
list.forEach(function (file) {
if (!/\.css$/.test(file)) return
processor.process(load(file), { from: resolve(__dirname, '../src/themes/', file) })
.then(function (result) {
save(file, result.css)
console.log('salad - ' + file)
isProd && cssnano(loadLib(file))
.then(function (result) {
saveMin(file, result.css)
console.log('cssnao - ' + file)
})
}).catch(function (err) {
console.log(err)
})
})

View file

@ -1,49 +1,119 @@
var rollup = require('rollup')
var buble = require('rollup-plugin-buble')
var commonjs = require('rollup-plugin-commonjs')
var nodeResolve = require('rollup-plugin-node-resolve')
var uglify = require('rollup-plugin-uglify')
var isProd = process.argv[process.argv.length - 1] !== '--dev'
const rollup = require('rollup')
const buble = require('rollup-plugin-buble')
const commonjs = require('rollup-plugin-commonjs')
const nodeResolve = require('rollup-plugin-node-resolve')
const uglify = require('rollup-plugin-uglify')
const replace = require('rollup-plugin-replace')
const isProd = process.env.NODE_ENV === 'production'
const version = process.env.VERSION || require('../package.json').version
const chokidar = require('chokidar')
const path = require('path')
var build = function (opts) {
const build = function (opts) {
rollup
.rollup({
entry: 'src/' + opts.entry,
plugins: [buble()].concat(opts.plugins || [])
input: opts.input,
plugins: (opts.plugins || []).concat([
buble(),
commonjs(),
nodeResolve(),
replace({
__VERSION__: version,
'process.env.SSR': false
})
])
})
.then(function (bundle) {
var dest = 'lib/' + (opts.output || opts.entry)
var dest = 'lib/' + (opts.output || opts.input)
console.log(dest)
bundle.write({
format: 'iife',
moduleName: opts.moduleName || 'D',
dest: dest
file: dest,
strict: false
})
})
.catch(function (err) {
console.error(err)
})
}
const buildCore = function () {
build({
input: 'src/core/index.js',
output: 'docsify.js'
})
build({
entry: 'index.js',
output: 'docsify.js',
plugins: [commonjs(), nodeResolve()]
})
isProd && build({
entry: 'index.js',
output: 'docsify.min.js',
plugins: [commonjs(), nodeResolve(), uglify()]
})
build({
entry: 'plugins/search.js',
output: 'plugins/search.js',
moduleName: 'D.Search'
})
isProd && build({
entry: 'plugins/search.js',
output: 'plugins/search.min.js',
moduleName: 'D.Search',
plugins: [uglify()]
})
if (isProd) {
build({
input: 'src/core/index.js',
output: 'docsify.min.js',
plugins: [uglify()]
})
}
}
const buildAllPlugin = function () {
var plugins = [
{name: 'search', input: 'search/index.js'},
{name: 'ga', input: 'ga.js'},
{name: 'matomo', input: 'matomo.js'},
{name: 'emoji', input: 'emoji.js'},
{name: 'external-script', input: 'external-script.js'},
{name: 'front-matter', input: 'front-matter/index.js'},
{name: 'zoom-image', input: 'zoom-image.js'},
{name: 'disqus', input: 'disqus.js'},
{name: 'gitalk', input: 'gitalk.js'}
]
plugins.forEach(item => {
build({
input: 'src/plugins/' + item.input,
output: 'plugins/' + item.name + '.js'
})
})
if (isProd) {
plugins.forEach(item => {
build({
input: 'src/plugins/' + item.input,
output: 'plugins/' + item.name + '.min.js',
plugins: [uglify()]
})
})
}
}
if (!isProd) {
chokidar
.watch(['src/core', 'src/plugins'], {
atomic: true,
awaitWriteFinish: {
stabilityThreshold: 1000,
pollInterval: 100
}
})
.on('change', p => {
console.log('[watch] ', p)
const dirs = p.split(path.sep)
if (dirs[1] === 'core') {
buildCore()
} else if (dirs[2]) {
const name = path.basename(dirs[2], '.js')
const input = `src/plugins/${name}${
/\.js/.test(dirs[2]) ? '' : '/index'
}.js`
build({
input,
output: 'plugins/' + name + '.js'
})
}
})
.on('ready', () => {
console.log('[start]')
buildCore()
buildAllPlugin()
})
} else {
buildCore()
buildAllPlugin()
}

14
build/cover.js Normal file
View file

@ -0,0 +1,14 @@
var fs = require('fs')
var read = fs.readFileSync
var write = fs.writeFileSync
var version = process.env.VERSION || require('../package.json').version
var file = __dirname + '/../docs/_coverpage.md'
var cover = read(file, 'utf8').toString()
console.log('Replace version number in cover page...')
cover = cover.replace(
/<small>(\S+)?<\/small>/g,
'<small>' + version + '</small>'
)
write(file, cover)

12
build/mincss.js Normal file
View file

@ -0,0 +1,12 @@
const cssnano = require('cssnano').process
const path = require('path')
const fs = require('fs')
files = fs.readdirSync(path.resolve('lib/themes'))
files.forEach(file => {
file = path.resolve('lib/themes', file)
cssnano(fs.readFileSync(file)).then(result => {
fs.writeFileSync(file, result.css)
})
})

50
build/release.sh Executable file
View file

@ -0,0 +1,50 @@
set -e
if [[ -z $1 ]]; then
echo "Enter new version: "
read VERSION
else
VERSION=$1
fi
read -p "Releasing $VERSION $RELEASE_TAG - are you sure? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Releasing $VERSION ..."
npm run test
# build
VERSION=$VERSION npm run build
# update packages
cd packages/docsify-server-renderer
npm version $VERSION
if [[ -z $RELEASE_TAG ]]; then
npm publish
else
npm publish --tag $RELEASE_TAG
fi
cd -
# commit
git add -A
git commit -m "[build] $VERSION $RELEASE_TAG"
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
# changelog
node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s
git add .
git commit -m "chore: add changelog $VERSION"
# publish
git tag v$VERSION
git push origin refs/tags/v$VERSION
git push
if [[ -z $RELEASE_TAG ]]; then
npm publish
else
npm publish --tag $RELEASE_TAG
fi
fi

34
build/ssr.js Normal file
View file

@ -0,0 +1,34 @@
var rollup = require('rollup')
var buble = require('rollup-plugin-buble')
var async = require('rollup-plugin-async')
var replace = require('rollup-plugin-replace')
rollup
.rollup({
input: 'packages/docsify-server-renderer/index.js',
plugins: [
async(),
replace({
__VERSION__: process.env.VERSION || require('../package.json').version,
'process.env.SSR': true
}),
buble({
transforms: {
generator: false
}
})
],
onwarn: function () {}
})
.then(function (bundle) {
var dest = 'packages/docsify-server-renderer/build.js'
console.log(dest)
bundle.write({
format: 'cjs',
file: dest
})
})
.catch(function (err) {
console.error(err)
})

View file

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/themes/vue.css">
</head>
<body>
<nav>
<a href="#/">En</a>
<a href="#/zh-cn">中文</a>
</nav>
<div id="app"></div>
</body>
<script>
window.$docsify = {
search: {
maxAge: 0
}
}
</script>
<script
src="/lib/docsify.js"
data-repo="qingwei-li/docsify"
data-name="docsify"
data-base-path="docs/"
data-auto2top></script>
<script src="/lib/plugins/search.js"></script>
</html>

View file

@ -1,497 +1,32 @@
## Quick Start
### Create a project
First create a project, then create a `docs` folder
```bash
mkdir my-project && cd my-project
mkdir docs && cd docs
```
### Create entry file
Create a `index.html` file
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify"></script>
</html>
```
Create `README.md` as the main page
```markdown
# Title
## blabla
```
### Deploy!
Push code and activate **GitHub Pages** via your repo's settings
![image](https://cloud.githubusercontent.com/assets/7565692/20639058/e65e6d22-b3f3-11e6-9b8b-6309c89826f2.png)
## CLI
Easy to setup and preview a docs.
### Install
```bash
npm i docsify-cli -g
```
### Setup
Setup a boilerplate docs
```bash
docsify init docs
```
### Preview
Preview and serve your docs using
```bash
docsify serve docs
```
Read more [docsify-cli](https://github.com/QingWei-Li/docsify-cli)
## More
### Themes
Currently available `vue.css` and `buble.css`
```html
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
```
Minified files
```html
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css">
```
### Multiple pages
If you need other pages, directly create the markdown file, such as `guide.md` is `/#/guide`.
### Navbar
Code in `index.html`
```html
<nav>
<a href="/#/docsify/">En</a>
<a href="/#/docsify/zh-cn">中文</a>
</nav>
```
### CDN
- UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/)
- jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify)
### Cover Page
Generate a cover page with markdown. Create a `_coverpage.md` and set `data-coverpage` in the script tag.
```markdown
![logo](_media/icon.svg)
# docsify <small>1.2.0</small>
## docsify
> A magical documentation site generator.
- Simple and lightweight (~12kb gzipped)
## What it is
docsify generates your documentation website on the fly. Unlike GitBook, it does not generate static html files. Instead, it smartly loads and parses your Markdown files and displays them as a website. To start using it, all you need to do is create an `index.html` and [deploy it on GitHub Pages](deploy.md).
See the [Quick start](quickstart.md) guide for more details.
## Features
- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Not build static html files
- Useful plugin API
- Emoji support
- Compatible with IE11
- Support server-side rendering ([example](https://github.com/docsifyjs/docsify-ssr-demo))
## Examples
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
```
Check out the [Showcase](https://github.com/docsifyjs/awesome-docsify#showcase) to see docsify in use.
#### Custom background
Currently the background of the cover page is generated randomly. We can customize the background color, or add a background image.
## Donate
```markdown
# docsify <small>1.2.0</small>
Please consider donating if you think docsify is helpful to you or that my work is valuable. I am happy if you can help me [buy a cup of coffee](https://github.com/QingWei-Li/donate). :heart:
> xxx
## Community
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- background image -->
![](_media/bg.png)
<!-- background color -->
![color](#f0f0f0)
```
### Markdown parser
Docsify uses [marked](https://github.com/chjj/marked) to parse markdown. We can configure it
```js
window.$docsify = {
markdown: {
smartypants: true
}
}
```
And it can even be customized
```js
window.$docsify = {
markdown: function(marked) {
// ...
return marked
}
}
```
### Doc Helpers
#### p.tip
`!> ` add your content will rendered as `<p class="tip">content</p>`
```markdown
!> Important **information**
```
It will be rendered
```html
<p class="tip">Important <strong>information</strong></p>
```
e.g.
!> Important **information**
#### p.warn
```markdown
?> todo info
```
?> todo info
### Combining Vue
We can write the Vue syntax directly in the markdown file, when the Vue library is loaded into `index.html`. Default will automatically initialize a Vue instance, of course, we can also manually.
index.html
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
```
```markdown
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
```
Manual initialization
```markdown
<div>
<input type="text" v-model="msg">
<p>Hello, {{ msg }}</p>
</div>
<script>
new Vue({
el: 'main',
data: { msg: 'Docsify' }
})
</script>
```
## Options
You can add configurations in the script tag attributes or with `window.$docsify`.
### repo
Display the [GitHub Corner](http://tholman.com/github-corners/) widget.
```html
<script src="//unpkg.com/docsify" data-repo="your/repo"></script>
```
```js
window.$docsify = {
repo: 'your/repo'
}
```
### max-level
TOC level.
```html
<script src="//unpkg.com/docsify" data-max-level="6"></script>
```
```js
window.$docsify = {
maxLevel: 6
}
```
### el
Root element.
```html
<script src="//unpkg.com/docsify" data-el="#app"></script>
```
```js
window.$docsify = {
el: '#app'
}
```
### load-sidebar
Load sidebar markdown file. If it is configured, load the current directory `_sidebar.md` by default. If the file doesn't exist, the sidebar will appear as a TOC.
** you should add `.nojekyll` into docs folder to prevent GitHub Pages from ignoring the `_sidebar.md`**
```html
<script src="/lib/docsify.js" data-load-sidebar></script>
```
You can specify a file:
```html
<script src="/lib/docsify.js" data-load-sidebar="_sidebar.md"></script>
```
```js
window.$docsify = {
loadSidebar: '_sidebar.md'
}
```
The contents of the file can be:
```markdown
- [Home](/)
- [Installation](/installation)
- Essentials
- [Getting Started](/getting-started)
- [Dynamic Route Matching](/dynamic-matching)
- [Nested Routes](/nested-routes)
```
### sub-max-level
Display TOC in the custom sidebar. The default value is 0.
```html
<script src="/lib/docsify.js" data-load-sidebar data-max-sub-level="4"></script>
```
```js
window.$docsify = {
maxSubLevel: 4
}
```
### load-navbar
Load navbar markdown file. If it is configured, load the current directory `_navbar.md` by default.
```html
<script src="/lib/docsify.js" data-load-navbar></script>
```
You can specify a file:
```html
<script src="/lib/docsify.js" data-load-navbar="_navbar.md"></script>
```
```js
window.$docsify = {
loadNavbar: '_navbar.md'
}
```
The contents of the file can be:
```markdown
- [en](/)
- [chinese](/zh-cn)
```
If you write a sub level list, it will generate a dropdown list.
```markdown
- [download](/download)
- language
- [en](/)
- [chinese](/zh-cn)
```
### auto2top
Scroll to the top on changing hash.
```html
<script src="/lib/docsify.js" data-auto2top></script>
<!-- Set offset top -->
<script src="/lib/docsify.js" data-auto2top="50"></script>
```
```js
window.$docsify = {
auto2top: true,
// auto2top: 50
}
```
### homepage
`README.md` will be rendered as a homepage for your website in the docs folder, but sometimes we want to specify another file as a homepage, or even use the `README.md` in your repo.
```html
<script src="/lib/docsify.js" data-homepage="https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md"></script>
<!-- Or using `Welcome.md` as homepge -->
<script src="/lib/docsify.js" data-homepage="Welcome.md"></script>
```
```js
window.$docsify = {
homepage: true
}
```
### base-path
If your HTML entry file and the markdown files are in different directories, we can use:
```html
<script src="/lib/docsify.js" data-base-path="/base/"></script>
<!-- Even if the docs is on another site 😄 -->
<script src="/lib/docsify.js" data-base-path="https://docsify.js.org/"></script>
```
```js
window.$docsify = {
basePath: '/base/'
}
```
### coverpage
Generate cover page.
```html
<script src="/lib/docsify.js" data-coverpage></script>
<!-- or -->
<script src="/lib/docsify.js" data-coverpage="other.md"></script>
```
```js
window.$docsify = {
coverpage: true
}
```
### name
Project name. It is displayed in the sidebar.
```html
<script src="/lib/docsify.js" data-name="docsify"></script>
```
```js
window.$docsify = {
name: 'docsify'
}
```
### name-link
Name link. The default value is `window.location.pathname`.
```html
<script src="/lib/docsify.js" data-name-link="/"></script>
```
```js
window.$docsify = {
nameLink: '/'
}
```
### theme-color
Customize the theme color.
```html
<script src="/lib/docsify.js" data-theme-color="#3F51B5"></script>
```
```js
window.$docsify = {
themeColor: '#3F51B5'
}
```
## Plugins
### Full Text Search
If a document can have a search, can enhance some user experience. Installing the search plugin is easy. Such as
```html
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
!> Configure the content before the plugin is installed.
```js
window.$docsify = {
search: 'auto', // default
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
// Full configuration
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
placeholder: 'Type to search'
}
}
```
Users and the development team are usually in the [Gitter chat room](https://gitter.im/docsifyjs/Lobby).

View file

@ -1,14 +1,12 @@
![logo](_media/icon.svg)
# docsify <small>2.1.0</small>
# docsify <small>4.9.4</small>
> A magical documentation site generator.
- Simple and lightweight (~13kB gzipped)
- Not build static html files
- Support emoji :laughing:
- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
[GitHub](https://github.com/docsifyjs/docsify/)
[Getting Started](#docsify)

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

1
docs/_media/example.html Normal file
View file

@ -0,0 +1 @@
<h1>To infinity and Beyond!</h1>

16
docs/_media/example.js Normal file
View file

@ -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)

1
docs/_media/example.md Normal file
View file

@ -0,0 +1 @@
> This is from the `example.md`

View file

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Before After
Before After

6
docs/_navbar.md Normal file
View file

@ -0,0 +1,6 @@
- Translations
- [:uk: English](/)
- [:cn: 中文](/zh-cn/)
- [:de: Deutsch](/de-de/)
- [:es: Spanish](/es/)
- [:ru: Russian](/ru/)

28
docs/_sidebar.md Normal file
View file

@ -0,0 +1,28 @@
- Getting started
- [Quick start](quickstart.md)
- [Writing more pages](more-pages.md)
- [Custom navbar](custom-navbar.md)
- [Cover page](cover.md)
- 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)
- 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](embed-files.md)
- [Awesome docsify](awesome.md)
- [Changelog](changelog.md)

50
docs/cdn.md Normal file
View file

@ -0,0 +1,50 @@
# CDN
Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [unpkg.com/docsify/](//unpkg.com/docsify/).
## Latest version
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<!-- load script -->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
Alternatively, use [compressed files](#compressed-file).
## Specific version
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/themes/vue.css">
<!-- load script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.js"></script>
```
## Compressed file
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<!-- load script -->
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/lib/themes/vue.css">
<!-- load script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.min.js"></script>
```
## Other CDN
- http://www.bootcdn.cn/docsify
- https://cdn.jsdelivr.net/npm/docsify/
- https://cdnjs.com/libraries/docsify

518
docs/configuration.md Normal file
View file

@ -0,0 +1,518 @@
# Configuration
You can configure the `window.$docsify`.
```html
<script>
window.$docsify = {
repo: 'docsifyjs/docsify',
maxLevel: 3,
coverpage: true
}
</script>
```
## el
- Type: `String`
- Default: `#app`
The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
```js
window.$docsify = {
el: '#app'
};
```
## repo
- Type: `String`
- Default: `null`
Configure the repository url or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
```js
window.$docsify = {
repo: 'docsifyjs/docsify',
// or
repo: 'https://github.com/docsifyjs/docsify/'
};
```
## maxLevel
- Type: `Number`
- Default: `6`
Maximum Table of content level.
```js
window.$docsify = {
maxLevel: 4
};
```
## loadNavbar
- Type: `Boolean|String`
- Default: `false`
Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
// load from _navbar.md
loadNavbar: true,
// load from nav.md
loadNavbar: 'nav.md'
};
```
## loadSidebar
- Type: `Boolean|String`
- Default: `false`
Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
// load from _sidebar.md
loadSidebar: true,
// load from summary.md
loadSidebar: 'summary.md'
};
```
## subMaxLevel
- Type: `Number`
- Default: `0`
Add table of contents (TOC) in custom sidebar.
```js
window.$docsify = {
subMaxLevel: 2
};
```
## auto2top
- Type: `Boolean`
- Default: `false`
Scrolls to the top of the screen when the route is changed.
```js
window.$docsify = {
auto2top: true
};
```
## homepage
- Type: `String`
- Default: `README.md`
`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
```js
window.$docsify = {
// Change to /home.md
homepage: 'home.md',
// Or use the readme in your repo
homepage:
'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md'
};
```
## basePath
- Type: `String`
Base path of the website. You can set it to another directory or another domain name.
```js
window.$docsify = {
basePath: '/path/',
// Load the files from another site
basePath: 'https://docsify.js.org/',
// Even can load files from other repo
basePath:
'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
};
```
## relativePath
- Type: `Boolean`
- Default: `false`
If **true** links are relative to the current context.
For example, the directory structure is as follows:
```text
.
└── docs
├── README.md
├── guide.md
└── zh-cn
├── README.md
├── guide.md
└── config
└── example.md
```
With relative path **enabled** and current URL `http://domain.com/zh-cn/README`, given links will resolve to:
```text
guide.md => http://domain.com/zh-cn/guide
config/example.md => http://domain.com/zh-cn/config/example
../README.md => http://domain.com/README
/README.md => http://domain.com/README
```
```js
window.$docsify = {
// Relative path enabled
relativePath: true,
// Relative path disabled (default value)
relativePath: false
};
```
## coverpage
- Type: `Boolean|String|String[]|Object`
- Default: `false`
Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
```js
window.$docsify = {
coverpage: true,
// Custom file name
coverpage: 'cover.md',
// mutiple covers
coverpage: ['/', '/zh-cn/'],
// mutiple covers and custom file name
coverpage: {
'/': 'cover.md',
'/zh-cn/': 'cover.md'
}
};
```
## logo
- Type: `String`
Website logo as it appears in the sidebar, you can resize by CSS.
```js
window.$docsify = {
logo: '/_media/icon.svg'
};
```
## name
- Type: `String`
Website name as it appears in the sidebar.
```js
window.$docsify = {
name: 'docsify'
};
```
## nameLink
- Type: `String`
- Default: `window.location.pathname`
The name of the link.
```js
window.$docsify = {
nameLink: '/',
// For each route
nameLink: {
'/zh-cn/': '/zh-cn/',
'/': '/'
}
};
```
## markdown
- Type: `Function`
See [Markdown configuration](markdown.md).
```js
window.$docsify = {
// object
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
},
// function
markdown: function(marked, renderer) {
// ...
return marked;
}
};
```
## themeColor
- Type: `String`
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
```js
window.$docsify = {
themeColor: '#3F51B5'
};
```
## alias
- Type: `Object`
Set the route alias. You can freely manage routing rules. Supports RegExp.
```js
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
'/.*/_sidebar.md': '/_sidebar.md' // See #301
}
};
```
## autoHeader
- type: `Boolean`
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to html. Compare [#78](https://github.com/docsifyjs/docsify/issues/78).
```js
window.$docsify = {
loadSidebar: true,
autoHeader: true
};
```
## executeScript
- type: `Boolean`
Execute the script on the page. Only parse the first script tag([demo](themes)). If Vue is present, it is turned on by default.
```js
window.$docsify = {
executeScript: true
};
```
```markdown
## This is test
<script>
console.log(2333)
</script>
```
Note that if you are running an external script, e.g. an embedded jsfiddle demo, make sure to include the [external-script](plugins.md?id=external-script) plugin.
## noEmoji
- type: `Boolean`
Disabled emoji parse.
```js
window.$docsify = {
noEmoji: true
};
```
## mergeNavbar
- type: `Boolean`
Navbar will be merged with the sidebar on smaller screens.
```js
window.$docsify = {
mergeNavbar: true
};
```
## formatUpdated
- type: `String|Function`
We can display the file update date through **{docsify-updated<span>}</span>** variable. And format it by `formatUpdated`.
See https://github.com/lukeed/tinydate#patterns
```js
window.$docsify = {
formatUpdated: '{MM}/{DD} {HH}:{mm}',
formatUpdated: function(time) {
// ...
return time;
}
};
```
## externalLinkTarget
- type: `String`
- default: `_blank`
Target to open external links. Default `'_blank'` (new window/tab)
```js
window.$docsify = {
externalLinkTarget: '_self' // default: '_blank'
};
```
## routerMode
- type: `String`
- default: `hash`
```js
window.$docsify = {
routerMode: 'history' // default: 'hash'
};
```
## noCompileLinks
- type: `Array`
Sometimes we do not want docsify to handle our links. See [#203](https://github.com/docsifyjs/docsify/issues/203)
```js
window.$docsify = {
noCompileLinks: ['/foo', '/bar/.*']
};
```
## onlyCover
- type: `Boolean`
Only coverpage is loaded when visiting the home page.
```js
window.$docsify = {
onlyCover: false
};
```
## requestHeaders
- type: `Object`
Set the request resource headers.
```js
window.$docsify = {
requestHeaders: {
'x-token': 'xxx'
}
};
```
## ext
- type: `String`
Request file extension.
```js
window.$docsify = {
ext: '.md'
};
```
## fallbackLanguages
- type: `Array<string>`
List of languages that will fallback to the default language when a page is request and didn't exists for the given local.
Example:
- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
- then display 404 page.
```js
window.$docsify = {
fallbackLanguages: ['fr', 'de']
};
```
## notFoundPage
- type: `Boolean` | `String` | `Object`
Load the `_404.md` file:
```js
window.$docsify = {
notFoundPage: true
};
```
Load the customised path of the 404 page:
```js
window.$docsify = {
notFoundPage: 'my404.md'
};
```
Load the right 404 page according to the localisation:
```js
window.$docsify = {
notFoundPage: {
'/': '_404.md',
'/de': 'de/_404.md'
}
};
```
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.

99
docs/cover.md Normal file
View file

@ -0,0 +1,99 @@
# Cover
Activate the cover feature by setting `coverpage` to **true**, compare [coverpage configuration](configuration.md#coverpage).
## Basic usage
Set `coverpage` to **true**, and create a `_coverpage.md`:
```html
<!-- index.html -->
<script>
window.$docsify = {
coverpage: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```markdown
<!-- _coverpage.md -->
![logo](_media/icon.svg)
# docsify <small>3.5</small>
> A magical documentation site generator.
- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsify)
```
!> A document site can have only one coverpage!
## Custom background
The background color is generated randomly by default. You can customize the background color or a background image:
```markdown
<!-- _coverpage.md -->
# docsify <small>3.5</small>
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#quick-start)
<!-- background image -->
![](_media/bg.png)
<!-- background color -->
![color](#f0f0f0)
```
## Coverpage as homepage
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
## Multiple covers
If your docs site is in more than one language, it may be useful to set multiple covers.
For example, your docs structure is like this
```text
.
└── docs
├── README.md
├── guide.md
├── _coverpage.md
└── zh-cn
├── README.md
└── guide.md
└── _coverpage.md
```
Now, you can set
```js
window.$docsify = {
coverpage: ['/', '/zh-cn/']
};
```
Or a special file name
```js
window.$docsify = {
coverpage: {
'/': 'cover.md',
'/zh-cn/': 'cover.md'
}
};
```

96
docs/custom-navbar.md Normal file
View file

@ -0,0 +1,96 @@
# Custom navbar
## HTML
If you need custom navigation, you can create a HTML-based navigation bar.
!> Note that documentation links begin with `#/`.
```html
<!-- index.html -->
<body>
<nav>
<a href="#/">EN</a>
<a href="#/zh-cn/">中文</a>
</nav>
<div id="app"></div>
</body>
```
## Markdown
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [loadNavbar configuration](configuration.md#loadnavbar).
```html
<!-- index.html -->
<script>
window.$docsify = {
loadNavbar: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```markdown
<!-- _navbar.md -->
* [En](/)
* [chinese](/zh-cn/)
```
!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
`_navbar.md` is loaded from each level directory. If the current directory doesn't have `_navbar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
## Nesting
You can create sub-lists by indenting items that are under a certain parent.
```markdown
<!-- _navbar.md -->
* Getting started
* [Quick start](quickstart.md)
* [Writing more pages](more-pages.md)
* [Custom navbar](custom-navbar.md)
* [Cover page](cover.md)
* Configuration
* [Configuration](configuration.md)
* [Themes](themes.md)
* [Using plugins](plugins.md)
* [Markdown configuration](markdown.md)
* [Language highlight](language-highlight.md)
```
renders as
![Nesting navbar](_images/nested-navbar.png 'Nesting navbar')
## Combining custom navbars with the emoji plugin
If you use the [emoji plugin](plugins#emoji):
```html
<!-- index.html -->
<script>
window.$docsify = {
// ...
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
```
you could, for example, use flag emojis in your custom navbar Markdown file:
```markdown
<!-- _navbar.md -->
* [:us:, :uk:](/)
* [:cn:](/zh-cn/)
```

131
docs/deploy.md Normal file
View file

@ -0,0 +1,131 @@
# Deploy
Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages, GitLab Pages or VPS.
## GitHub Pages
There're three places to populate your docs for your Github repository:
- `docs/` folder
- master branch
- gh-pages branch
It is recommended that you save your files to the `./docs` subfolder of the `master` branch of your repository. Then select `master branch /docs folder` as your Github Pages source in your repositories' settings page.
![github pages](_images/deploy-github-pages.png)
!> You can also save files in the root directory and select `master branch`.
You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch)
## GitLab Pages
If you are deploying your master branch, include `.gitlab-ci.yml` with the following script:
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
```YAML
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
```
!> You can replace script with `- cp -r docs/. public`, if `./docs` is your Docsify subfolder.
## Firebase Hosting
!> You'll need to install the Firebase CLI using `npm i -g firebase-tools` after signing into the [Firebase Console](https://console.firebase.google.com) using a Google Account.
Using Terminal determine and navigate to the directory for your Firebase Project - this could be `~/Projects/Docs` etc. From there, run `firebase init`, choosing `Hosting` from the menu (use **space** to select, **arrow keys** to change options and **enter** to confirm). Follow the setup instructions.
You should have your `firebase.json` file looking similar to this (I changed the deployment directory from `public` to `site`):
```json
{
"hosting": {
"public": "site",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
```
Once finished, build the starting template by running `docsify init ./site` (replacing site with the deployment directory you determined when running `firebase init` - public by default). Add/edit the documentation, then run `firebase deploy` from the base project directory.
## VPS
Try following nginx config.
```nginx
server {
listen 80;
server_name your.domain.com;
location / {
alias /path/to/dir/of/docs/;
index index.html;
}
}
```
## Netlify
1. Login to your [Netlify](https://www.netlify.com/) account.
2. In the [dashboard](https://app.netlify.com/) page, click **New site from Git**.
3. Choose a repository where you store your docs, leave the **Build Command** area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.
### HTML5 router
When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`, it's pretty simple when you're using Netlify, populate a `\redirects` file in the docs directory and you're all set:
```sh
/* /index.html 200
```
## AWS Amplify
1. Set the routerMode in the Docsify project `index.html` to *history* mode.
```html
<script>
window.$docsify = {
loadSidebar: true,
routerMode: 'history'
}
</script>
```
2. Login to your [AWS Console](https://aws.amazon.com).
3. Go to the [AWS Amplify Dashboard](https://aws.amazon.com/amplify).
4. Choose the **Deploy** route to setup your project.
5. When prompted, keep the build settings empty if you're serving your docs within the root directory. If you're serving your docs from a different directory, customise your amplify.yml
```yml
version: 0.1
frontend:
phases:
build:
commands:
- echo "Nothing to build"
artifacts:
baseDirectory: /docs
files:
- '**/*'
cache:
paths: []
```
6. Add the following Redirect rules in their displayed order.
| Source address | Target address | Type |
|----------------|----------------|---------------|
| /<*>.md | /<*>.md | 200 (Rewrite) |
| /<*> | /index.html | 200 (Rewrite) |

81
docs/embed-files.md Normal file
View file

@ -0,0 +1,81 @@
# Embed files
With docsify 4.6 it is now possible to embed any type of file.
You can embed these files as video, audio, iframes, or code blocks, and even Markdown files can even be embedded directly into the document.
For example, here embedded a Markdown file. You only need to do this:
```markdown
[filename](_media/example.md ':include')
```
Then the content of `example.md` will be displayed directly here
[filename](_media/example.md ':include')
You can check the original content for [example.md](_media/example.md ':ignore').
Normally, this will compiled into a link, but in docsify, if you add `:include` it will be embedded.
## Embedded file type
Currently, file extension are automatically recognized and embedded in different ways.
This is a supported embedding type:
* **iframe** `.html`, `.htm`
* **markdown** `.markdown`, `.md`
* **audio** `.mp3`
* **video** `.mp4`, `.ogg`
* **code** other file extension
Of course, you can force the specified. For example, you want to Markdown file as code block embedded.
```markdown
[filename](_media/example.md ':include :type=code')
```
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.
```markdown
[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px')
```
[cinwell website](https://cinwell.com ':include :type=iframe width=100% height=400px')
Did you see it? You only need to write directly. You can check [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) for these attributes.
## The code block highlight
Embedding any type of source code file, you can specify the highlighted language or automatically identify.
```markdown
[](_media/example.html ':include :type=code text')
```
⬇️
[](_media/example.html ':include :type=code text')
?> How to set highlight? You can see [here](language-highlight.md).

145
docs/helpers.md Normal file
View file

@ -0,0 +1,145 @@
# Doc helper
docsify extends Markdown syntax to make your documents more readable.
## important content
Important content like:
```markdown
!> **Time** is money, my friend!
```
is rendered as:
!> **Time** is money, my friend!
## General tips
General tips like:
```markdown
?> _TODO_ unit test
```
are rendered as:
?> _TODO_ unit test
## Ignore to compile link
Some time we will put some other relative path to the link, you have to need to tell docsify you don't need to compile this link. For example
```md
[link](/demo/)
```
It will be compiled to `<a href="/#/demo/">link</a>` and will be loaded `/demo/README.md`. Maybe you want to jump to `/demo/index.html`.
Now you can do that
```md
[link](/demo/ ':ignore')
```
You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set title for link.
```md
[link](/demo/ ':ignore title')
<a href="/demo/" title="title">link</a>
```
## Set target attribute for link
```md
[link](/demo ':target=_blank')
[link](/demo2 ':target=_self')
```
## Disable link
```md
[link](/demo ':disabled')
```
## Github Task Lists
```md
- [ ] foo
- bar
- [x] baz
- [] bam <~ not working
- [ ] bim
- [ ] lim
```
- [ ] foo
- bar
- [x] baz
- [] bam <~ not working
- [ ] bim
- [ ] lim
## Image resizing
```md
![logo](https://docsify.js.org/_media/icon.svg ':size=50x100')
![logo](https://docsify.js.org/_media/icon.svg ':size=100')
<!-- Support percentage -->
![logo](https://docsify.js.org/_media/icon.svg ':size=10%')
```
![logo](https://docsify.js.org/_media/icon.svg ':size=50x100')
![logo](https://docsify.js.org/_media/icon.svg ':size=100')
![logo](https://docsify.js.org/_media/icon.svg ':size=10%')
## 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>

View file

@ -1,26 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify - A magical documentation site generator.</title>
<link rel="icon" href="favicon.ico">
<title>docsify</title>
<link rel="icon" href="_media/favicon.ico">
<meta name="google-site-verification" content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages">
<meta name="description" content="A magical documentation generator.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="vue">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="buble" disabled>
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/pure.css" title="pure" disabled>
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>
<body>
<nav>
<a href="#/">En</a>
<a href="#/zh-cn">中文</a>
</nav>
<div id="app"></div>
<div id="app">Loading ...</div>
<script>
window.$docsify = {
alias: {
'.*?/awesome': 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
'/de-de/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
'/ru/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
'/es/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
ga: 'UA-106147152-1',
matomo: {
host: '//matomo.thunderwave.de',
id: 6
},
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/docsifyjs/docsify/blob/master/docs/' + vm.route.file
}
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n\n----\n\n'
+ '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
})
},
DocsifyCodefund.create('fae1f9a4-870c-4c25-b8e0-c80464f7a95c')
]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/matomo.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'docsifyjs/Lobby'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</body>
<script
src="//unpkg.com/docsify/lib/docsify.min.js"
data-max-level="4"
data-coverpage
data-name="docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
</html>

View file

@ -0,0 +1,11 @@
# language highlight
**docsify** uses [Prism](https://github.com/PrismJS/prism) to highlight code blocks in your pages. By default it only supports CSS, JavaScript and HTML. You can make **Prism** load additional languages:
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-php.min.js"></script>
```
?> Check the [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) list for more options.

56
docs/markdown.md Normal file
View file

@ -0,0 +1,56 @@
# Markdown configuration
**docsify** uses [marked](https://github.com/markedjs/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`:
```js
window.$docsify = {
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
}
}
```
?> Configuration Options Reference [marked documentation](https://marked.js.org/#/USING_ADVANCED.md)
Even you can completely customize the parsing rules.
```js
window.$docsify = {
markdown: function(marked, renderer) {
// ...
return marked
}
}
```
## Supports mermaid
```js
// Import mermaid
// <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 = {
markdown: {
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
);
}
return this.origin.code.apply(this, arguments);
}
}
}
}
```

125
docs/more-pages.md Normal file
View file

@ -0,0 +1,125 @@
# More pages
If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
For example, the directory structure is as follows:
```text
.
└── docs
├── README.md
├── guide.md
└── zh-cn
├── README.md
└── guide.md
```
Matching routes
```text
docs/README.md => http://domain.com
docs/guide.md => http://domain.com/guide
docs/zh-cn/README.md => http://domain.com/zh-cn/
docs/zh-cn/guide.md => http://domain.com/zh-cn/guide
```
## Sidebar
In order to have sidebar, then you can create your own `_sidebar.md` (see [this documentation's sidebar](https://github.com/docsifyjs/docsify/blob/master/docs/_sidebar.md) for an example):
First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration.md#loadsidebar).
```html
<!-- index.html -->
<script>
window.$docsify = {
loadSidebar: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Create the `_sidebar.md`:
```markdown
<!-- docs/_sidebar.md -->
* [Home](/)
* [Guide](guide.md)
```
You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
## Nested Sidebars
You may want the sidebar to update with only navigation to reflect the current directory. This can be done by adding a `_sidebar.md` file to each folder.
`_sidebar.md` is loaded from each level directory. If the current directory doesn't have `_sidebar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_sidebar.md` will be loaded from `/guide/_sidebar.md`.
You can specify `alias` to avoid unnecessary fallback.
```html
<script>
window.$docsify = {
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
}
}
</script>
```
!> You can create a `README.md` file in a subdirectory to use it as the landing page for the route.
## Set Page Titles from Sidebar Selection
A page's `title` tag is generated from the _selected_ sidebar item name. For better SEO, you can customize the title by specifying a string after the filename.
```markdown
<!-- docs/_sidebar.md -->
* [Home](/)
* [Guide](guide.md "The greatest guide in the world")
```
## Table of Contents
Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files.
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [subMaxLevel configuration](configuration.md#submaxlevel).
```html
<!-- index.html -->
<script>
window.$docsify = {
loadSidebar: true,
subMaxLevel: 2
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
## Ignoring Subheaders
When `subMaxLevel` is set, each header is automatically added to the table of contents by default. If you want to ignore a specific header, add `{docsify-ignore}` to it.
```markdown
# Getting Started
## Header {docsify-ignore}
This header won't appear in the sidebar table of contents.
```
To ignore all headers on a specific page, you can use `{docsify-ignore-all}` on the first header of the page.
```markdown
# Getting Started {docsify-ignore-all}
## Header
This header won't appear in the sidebar table of contents.
```
Both `{docsify-ignore}` and `{docsify-ignore-all}` will not be rendered on the page when used.

197
docs/plugins.md Normal file
View file

@ -0,0 +1,197 @@
# List of Plugins
## Full text search
By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
```html
<script>
window.$docsify = {
search: 'auto', // default
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
// complete configuration parameters
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
placeholder: 'Type to search',
// Localization
placeholder: {
'/zh-cn/': '搜索',
'/': 'Type to search'
},
noData: 'No Results!',
// Localization
noData: {
'/zh-cn/': '找不到结果',
'/': 'No Results'
},
// Headline depth, 1 - 6
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>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
```
## Google Analytics
Install the plugin and configure the track id.
```html
<script>
window.$docsify = {
ga: 'UA-XXXXX-Y'
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
```
Configure by `data-ga`.
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
```
## emoji
The default is to support parsing emoji. For example `:100:` will be parsed to :100:. But it is not precise because there is no matching non-emoji string. If you need to correctly parse the emoji string, you need install this plugin.
```html
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
```
## External Script
If the script on the page is an external one (imports a js file via `src` attribute), you'll need this plugin to make it work.
```html
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
```
## Zoom image
Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour/medium-zoom).
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
```
Exclude the special image
```markdown
![](image.png ":no-zoom")
```
## Edit on github
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), check [document](https://github.com/njleonzhang/docsify-edit-on-github)
## Demo code with instant preview and jsfiddle integration
With this plugin, sample code can be rendered on the page instantly, so that the readers can see the preview immediately.
When readers expand the demo box, the source code and description are shown there. if they click the button `Try in Jsfiddle`,
`jsfiddle.net` will be open with the code of this sample, which allow readers to revise the code and try on their own.
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
## Copy to Clipboard
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
```html
<script src="//unpkg.com/docsify-copy-code"></script>
```
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
## Disqus
Disqus comments. https://disqus.com/
```html
<script>
window.$docsify = {
disqus: 'shortname'
}
</script>
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
```
## Gitalk
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
```html
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
<script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script>
<script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script>
<script>
const gitalk = new Gitalk({
clientID: 'Github Application Client ID',
clientSecret: 'Github Application Client Secret',
repo: 'Github repo',
owner: 'Github repo owner',
admin: ['Github repo collaborators, only these guys can initialize github issues'],
// facebook-like distraction free mode
distractionFreeMode: false
})
</script>
```
## Pagination
Pagination for docsify. By [@imyelo](https://github.com/imyelo)
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
```
## codefund
a [plugin](https://github.com/njleonzhang/docsify-plugin-codefund) to make it easy to join up [codefund](https://codefund.io/)
> codefund is formerly known as "codesponsor"
```
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
window.$docsify = {
plugins: [
DocsifyCodefund.create('xxxx-xxx-xxx') // change to your codefund id
]
}
```
## Tabs
A docsify.js plugin for displaying tabbed content from markdown.
- [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)

115
docs/pwa.md Normal file
View file

@ -0,0 +1,115 @@
# Offline Mode
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) are experiences that combine the best of the web with the best of apps. We can enhance our website with service workers to work **offline** or on low-quality networks.
It is also very easy to use it.
## Create serviceWorker
Create a `sw.js` file in your documents root directory and copy the following code:
*sw.js*
```js
/* ===========================================================
* docsify sw.js
* ===========================================================
* Copyright 2016 @huxpro
* Licensed under Apache 2.0
* Register service worker.
* ========================================================== */
const RUNTIME = 'docsify'
const HOSTNAME_WHITELIST = [
self.location.hostname,
'fonts.gstatic.com',
'fonts.googleapis.com',
'unpkg.com'
]
// The Util Function to hack URLs of intercepted requests
const getFixedUrl = (req) => {
var now = Date.now()
var url = new URL(req.url)
// 1. fixed http URL
// Just keep syncing with location.protocol
// fetch(httpURL) belongs to active mixed content.
// And fetch(httpRequest) is not supported yet.
url.protocol = self.location.protocol
// 2. add query for caching-busting.
// Github Pages served with Cache-Control: max-age=600
// max-age on mutable content is error-prone, with SW life of bugs can even extend.
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
if (url.hostname === self.location.hostname) {
url.search += (url.search ? '&' : '?') + 'cache-bust=' + now
}
return url.href
}
/**
* @Lifecycle Activate
* New one activated when old isnt being used.
*
* waitUntil(): activating ====> activated
*/
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim())
})
/**
* @Functional Fetch
* All network requests are being intercepted here.
*
* void respondWith(Promise<Response> r)
*/
self.addEventListener('fetch', event => {
// Skip some of cross-origin requests, like those for Google Analytics.
if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) {
// Stale-while-revalidate
// similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale
// Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1
const cached = caches.match(event.request)
const fixedUrl = getFixedUrl(event.request)
const fetched = fetch(fixedUrl, { cache: 'no-store' })
const fetchedCopy = fetched.then(resp => resp.clone())
// Call respondWith() with whatever we get first.
// If the fetch fails (e.g disconnected), wait for the cache.
// If theres nothing in cache, wait for the fetch.
// If neither yields a response, return offline pages.
event.respondWith(
Promise.race([fetched.catch(_ => cached), cached])
.then(resp => resp || fetched)
.catch(_ => { /* eat any errors */ })
)
// Update the cache with the version we fetched (only for ok status)
event.waitUntil(
Promise.all([fetchedCopy, caches.open(RUNTIME)])
.then(([response, cache]) => response.ok && cache.put(event.request, response))
.catch(_ => { /* eat any errors */ })
)
}
})
```
## Register
Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge:
*index.html*
```html
<script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script>
```
## Enjoy it
Release your website and start experiencing magical offline feature. :ghost: You can turn off Wi-Fi and refresh the current site to experience it.

94
docs/quickstart.md Normal file
View file

@ -0,0 +1,94 @@
# Quick start
It is recommended to install `docsify-cli` globally, which helps initializing and previewing the website locally.
```bash
npm i docsify-cli -g
```
## Initialize
If you want to write the documentation in the `./docs` subdirectory, you can use the `init` command.
```bash
docsify init ./docs
```
## Writing content
After the `init` is complete, you can see the file list in the `./docs` subdirectory.
* `index.html` as the entry file
* `README.md` as the home page
* `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
You can easily update the documentation in `./docs/README.md`, of course you can add [more pages](more-pages.md).
## Preview your site
Run the local server with `docsify serve`. You can preview your site in your browser on `http://localhost:3000`.
```bash
docsify serve docs
```
?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/docsifyjs/docsify-cli).
## Manual initialization
If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`:
```html
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
//...
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>
</html>
```
If you installed python on your system, you can easily use it to run a static server to preview your site.
```bash
cd docs && python -m SimpleHTTPServer 3000
```
## Loading dialog
If you want, you can show a loading dialog before docsify starts to render your documentation:
```html
<!-- index.html -->
<div id="app">Please wait...</div>
```
You should set the `data-app` attribute if you changed `el`:
```html
<!-- index.html -->
<div data-app id="main">Please wait...</div>
<script>
window.$docsify = {
el: '#main'
}
</script>
```
Compare [el configuration](configuration.md#el).

124
docs/ssr.md Normal file
View file

@ -0,0 +1,124 @@
# Server-Side Rendering
See https://docsify.now.sh
Repo in https://github.com/docsifyjs/docsify-ssr-demo
## Why SSR?
- Better SEO
- Feeling cool
## Quick start
Install `now` and `docsify-cli` in your project.
```bash
npm i now docsify-cli -D
```
Edit `package.json`. If the documentation in `./docs` subdirectory.
```json
{
"name": "my-project",
"scripts": {
"start": "docsify start . -c ssr.config.js",
"deploy": "now -p"
},
"files": [
"docs"
],
"docsify": {
"config": {
"basePath": "https://docsify.js.org/",
"loadSidebar": true,
"loadNavbar": true,
"coverpage": true,
"name": "docsify"
}
}
}
```
!> The `basePath` just like webpack `publicPath`. We can use local or remote files.
We can preview in the local to see if it works.
```bash
npm start
# open http://localhost:4000
```
Publish it!
```bash
now -p
```
Now, You have a support for SSR the docs site.
## Custom template
You can provide a template for entire page's HTML. such as
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css" title="vue">
</head>
<body>
<!--inject-app-->
<!--inject-config-->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
</body>
</html>
```
The template should contain these comments for rendered app content.
- `<!--inject-app-->`
- `<!--inject-config-->`
## Configuration
You can configure it in a special config file, or `package.json`.
```js
module.exports = {
template: './ssr.html',
maxAge: 60 * 60 * 1000, // lru-cache config
config: {
// docsify config
}
}
```
## Deploy for your VPS
You can run `docsify start` directly on your Node server, or write your own server app with `docsify-server-renderer`.
```js
var Renderer = require('docsify-server-renderer')
var readFileSync = require('fs').readFileSync
// init
var renderer = new Renderer({
template: readFileSync('./docs/index.template.html', 'utf-8'),
config: {
name: 'docsify',
repo: 'docsifyjs/docsify'
}
})
renderer.renderToString(url)
.then(html => {})
.catch(err => {})
```

60
docs/themes.md Normal file
View file

@ -0,0 +1,60 @@
# Themes
There are currently three themes available. Copy [Vue](//vuejs.org) and [buble](//buble.surge.sh) website custom theme and [@liril-net](https://github.com/liril-net) contribution to the theme of the black style.
```html
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/pure.css">
```
!> Compressed files are available in `/lib/themes/`.
```html
<!-- compressed -->
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/pure.css">
```
If you have any ideas or would like to develop a new theme, you are welcome to submit a [pull request](https://github.com/docsifyjs/docsify/pulls).
#### Click to preview
<div class="demo-theme-preview">
<a data-theme="vue">vue.css</a>
<a data-theme="buble">buble.css</a>
<a data-theme="dark">dark.css</a>
<a data-theme="pure">pure.css</a>
</div>
<style>
.demo-theme-preview a {
padding-right: 10px;
}
.demo-theme-preview a:hover {
cursor: pointer;
text-decoration: underline;
}
</style>
<script>
var preview = Docsify.dom.find('.demo-theme-preview');
var themes = Docsify.dom.findAll('[rel="stylesheet"]');
preview.onclick = function (e) {
var title = e.target.getAttribute('data-theme')
themes.forEach(function (theme) {
theme.disabled = theme.title !== title
});
};
</script>
## Other themes
- [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/#/) A delightfully simple theme system for docsify.

99
docs/vue.md Normal file
View file

@ -0,0 +1,99 @@
# Compatible with Vue
You can write Vue components directly in the Markdown file, and it will be parsed. You can use this feature to write vue demo and documentation together.
## Basic usage
Load the Vue in `./index.html`.
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
<!-- Or use the compressed files -->
<script src="//unpkg.com/vue/dist/vue.min.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main' })` script is executed by default to create instance.
*README.md*
````markdown
# Vue guide
`v-for` usage.
```html
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
```
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
````
You can manually initialize a Vue instance.
*README.md*
```markdown
# Vue demo
<div id="main">hello {{ msg }}</div>
<script>
new Vue({
el: '#main',
data: { msg: 'Vue' }
})
</script>
```
!> In a Markdown file, only the script within the first script tag is executed.
## Combine Vuep to write playground
[Vuep](https://github.com/QingWei-Li/vuep) is a component for rendering Vue components with live editor and preview. Supports Vue component spec and JSX.
*index.html*
```html
<!-- Inject CSS file -->
<link rel="stylesheet" href="//unpkg.com/vuep/dist/vuep.css">
<!-- Inject JavaScript file -->
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vuep"></script>
<script src="//unpkg.com/docsify"></script>
<!-- or use the compressed files -->
<script src="//unpkg.com/vue/dist/vue.min.js"></script>
<script src="//unpkg.com/vuep/dist/vuep.min.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
*README.md*
```markdown
# Vuep
<vuep template="#example"></vuep>
<script v-pre type="text/x-template" id="example">
<template>
<div>Hello, {{ name }}!</div>
</template>
<script>
module.exports = {
data: function () {
return { name: 'Vue' }
}
}
</script>
</script>
```
?> Example Refer to the [Vuep documentation](https://qingwei-li.github.io/vuep/).

111
docs/write-a-plugin.md Normal file
View file

@ -0,0 +1,111 @@
# Write a plugin
A plugin is simply a function that takes `hook` as an argument. The hook supports handling of asynchronous tasks.
## Full configuration
```js
window.$docsify = {
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.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.mounted(function() {
// Called after initial completion. Only trigger once, 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.
## Example
#### footer
Add footer component in each pages.
```js
window.$docsify = {
plugins: [
function(hook) {
var footer = [
'<hr/>',
'<footer>',
'<span><a href="https://github.com/QingWei-Li">cinwell</a> &copy;2017.</span>',
'<span>Proudly published with <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>',
'</footer>'
].join('');
hook.afterEach(function(html) {
return html + footer;
});
}
]
};
```
### Edit Button
```js
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';
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>

View file

@ -1,503 +0,0 @@
## 特性
- 无需构建,写完 markdown 直接发布
- 支持自定义主题
- 容易使用并且轻量 (~12kb gzipped)
## 快速上手
### 创建项目
新建一个空项目,接着创建一个 `docs` 目录并进入到 docs 目录下
```bash
mkdir my-project && cd my-project
mkdir docs && cd docs
```
### 创建入口文件
创建一个 `index.html` 文件,内容为
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify"></script>
</html>
```
新建 `README.md` 文件,作为主页面
```
# Title
## balabala
```
### 部署!
将项目 `push` 到 GitHub 仓库后到设置页面开启 **GitHub Pages** 功能,选择 `docs/` 选项
![image](https://cloud.githubusercontent.com/assets/7565692/20639058/e65e6d22-b3f3-11e6-9b8b-6309c89826f2.png)
## 命令行工具
方便快速创建文档目录,会读取项目的 `package.json` 里的选项作为 docsify 的配置,支持本地预览。
### 安装
```bash
npm i docsify-cli -g
```
### 初始化文档
默认初始化在当前目录,推荐将文档放在 `docs` 目录下
```bash
docsify init docs
```
### 启动本地服务
启动一个 server 方便预览,打开 http://localhost:3000
```bash
docsify serve docs
```
更多选项参考 [docsify-cli](https://github.com/QingWei-Li/docsify-cli)
## 更多功能
### 主题
目前提供 vue.css 和 buble.css直接修改 `index.html` 里的 cdn 地址即可
```html
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
```
压缩版
```html
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css">
```
### 多页面
`README.md` 作为主页面,如果需要其他页面,直接在文档目录下创建对应的 `*.md` 文件,例如创建一个 `guide.md` 那么对应的路由就是 `/#/guide`
### 导航
导航需要自己写在 `index.html` 文件里,效果参考本文档
```html
<nav>
<a href="/#/docsify/">En</a>
<a href="/#/docsify/zh-cn">中文</a>
</nav>
```
### CDN
- UNPKG [https://unpkg.com/docsify/](https://unpkg.com/docsify/)
- jsDelivr [http://www.jsdelivr.com/projects/docsify](http://www.jsdelivr.com/projects/docsify)
### 封面
只需要写几行简单的 markdown 就可以拥有一页精致的封面,通过添加 `data-coverpage` 属性,并创建 `_coverpage.md`,按照下面的格式书写即可。
```markdown
![logo](_media/icon.svg)
# docsify <small>1.2.0</small>
> A magical documentation site generator.
- Simple and lightweight (~12kb gzipped)
- Multiple themes
- Not build static html files
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
```
#### 自定义封面背景
默认的背景是随机生成的,你可以自定义背景色或者背景图片。只需要在文档末尾用添加图片的 Markdown 语法
```markdown
# docsify <small>1.2.0</small>
> xxx
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- 背景图片 -->
![](_media/bg.png)
<!-- 背景色 -->
![color](#f0f0f0)
```
### 自定义 Markdown parser
默认使用 [marked](https://github.com/chjj/marked) 处理 markdown 部分,你可以修改默认配置
```js
window.$docsify = {
markdown: {
smartypants: true
}
}
```
甚至可以完全定制化
```js
window.$docsify = {
markdown: function(marked) {
// ...
return marked
}
}
```
### 文档助手
#### 内置「提示」语法
`!>`后面接内容,会渲染成带 tip 类名的段落。
```markdown
!> 提示信息,**支持其他 markdown 语法**
```
将被渲染成
```html
<p class="tip">提示信息<strong>支持其他 markdown 语法</strong></p>
```
效果
!> 适合显示醒目的内容
#### 内置「警示」语法
`?>`后面接内容,会渲染成带 warn 类名的段落。
```markdown
?> 警示内容样式
```
效果
?> 警示内容样式
### 结合 Vue
`index.html` 内引入 Vue 后,可以在文档里直接写 Vue 语法。默认会自己初始化一个 Vue 示例,当然我们也可以手动初始化一个实例。
index.html
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
```
```markdown
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
```
手动初始化示例
```markdown
<div>
<input type="text" v-model="msg">
<p>Hello, {{ msg }}</p>
</div>
<script>
new Vue({
el: 'main',
data: { msg: 'Docsify' }
})
</script>
```
## 配置参数
你可以通过在标签上添加属性的方式,或者给 `window.$docsify` 传配置信息。
### repo
参考本文档的右上角的 GitHub 图标,如果要开启的话,将 `index.html` 里的 script 改成
```html
<script src="//unpkg.com/docsify" data-repo="your/repo"></script>
```
```js
window.$docsify = {
repo: 'your/repo'
}
```
### max-level
目录最大展开层级,默认值为 6
```html
<script src="//unpkg.com/docsify" data-max-level="6"></script>
```
```js
window.$docsify = {
maxLevel: 6
}
```
### el
替换节点元素,默认为 `#app`
```html
<script src="//unpkg.com/docsify" data-el="#app"></script>
```
```js
window.$docsify = {
el: '#app'
}
```
### load-sidebar
读取侧边栏配置文件,如果配置,默认加载当前目录下的 `_sidebar.md`。如果文件不存在,会显示 TOC 作为侧边栏内容。如果你有二级目录,也应该放置一份配置文件。
**如果用 `_` 开头作为文件名,你应该在文档目录下添加 `.nojekyll`,阻止 GitHub Pages 忽略下划线开头的文件。**
```html
<script src="/lib/docsify.js" data-load-sidebar></script>
```
你可以指定侧边栏文件名
```html
<script src="/lib/docsify.js" data-load-sidebar="_sidebar.md"></script>
```
```js
window.$docsify = {
loadSidebar: '_sidebar.md'
}
```
`_sidebar.md` 的内容可以是这样的
```markdown
- [Home](/)
- [Installation](/installation)
- Essentials
- [Getting Started](/getting-started)
- [Dynamic Route Matching](/dynamic-matching)
- [Nested Routes](/nested-routes)
```
### sub-max-level
显示 TOC 在自定义的侧边栏里,默认最大显示 0 层。
```html
<script src="/lib/docsify.js" data-load-sidebar data-max-sub-level="4"></script>
```
```js
window.$docsify = {
maxSubLevel: 4
}
```
### load-navbar
读取导航配置文件,如果配置,默认加载当前目录下的 `_navbar.md`。如果文件不存在,会显示 html 里定义的导航栏。
```html
<script src="/lib/docsify.js" data-load-navbar></script>
```
你可以指定导航栏文件名
```html
<script src="/lib/docsify.js" data-load-navbar="_navbar.md"></script>
```
```js
window.$docsify = {
loadNavbar: '_navbar.md'
}
```
`_navbar.md` 的内容可以是这样
```markdown
- [en](/)
- [中文](/zh-cn)
```
当然也支持二级列表,将生成一个下拉列表
```markdown
- [download](/download)
- language
- [en](/)
- [中文](/zh-cn)
```
### auto2top
切换路由时自动跳转到页面顶部
```html
<script src="/lib/docsify.js" data-auto2top></script>
```
```js
window.$docsify = {
auto2top: true
}
```
### homepage
默认情况下网站会将根目录下 `README.md` 作为首页渲染,但是有些时候我们想指定其他文件,甚至想直接将 repo 下的 README 作为首页。
```html
<script src="/lib/docsify.js" data-homepage="https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md"></script>
<!-- 或者将 Welcome.md 作为首页 -->
<script src="/lib/docsify.js" data-homepage="Welcome.md"></script>
```
```js
window.$docsify = {
homepage: true
}
```
### base-path
指定加载文档的路径,如果你的 HTML 入口文件和文档是放在不同地方,你可以设置:
```html
<script src="/lib/docsify.js" data-base-path="/base/"></script>
<!-- 甚至文档是在其他站点下 😄 -->
<script src="/lib/docsify.js" data-base-path="https://docsify.js.org/"></script>
```
```js
window.$docsify = {
basePath: '/base/'
}
```
### coverpage
生成封面,参考 [#封面](/zh-cn#封面).
```html
<script src="/lib/docsify.js" data-coverpage></script>
<!-- or -->
<script src="/lib/docsify.js" data-coverpage="other.md"></script>
```
```js
window.$docsify = {
coverpage: true
}
```
### name
项目名,将显示在侧边栏。
```html
<script src="/lib/docsify.js" data-name="docsify"></script>
```
```js
window.$docsify = {
name: 'docsify'
}
```
### name-link
项目名链接,默认为 `window.location.pathname`
```html
<script src="/lib/docsify.js" data-name-link="/"></script>
```
```js
window.$docsify = {
nameLink: '/'
}
```
### theme-color
自定义主题色。
```html
<script src="/lib/docsify.js" data-theme-color="#3F51B5"></script>
```
```js
window.$docsify = {
themeColor: '#3F51B5'
}
```
## Plugins
### 全文检索 - search
一份文档如果能有搜索功能会提升一些用户体验,加载搜索插件也很简单,直接引入就自动安装并启用。默认情况下会自动分析当前页面上的超链接,获取内容后建立索引并存储在 `localStorage` 里,默认过期时间为一天,当然这是可配置的。
自动识别的方式不一定能识别完整或者如果你想指定某些文件可索引,你可以自己指定文件的路径。
```html
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
!> 配置要在 docsify 引入之前
```js
window.$docsify = {
search: 'auto', // default
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
// Full configuration
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
placeholder: 'Type to search'
}
}
```

84
index.html Normal file
View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="/themes/vue.css" title="vue">
<link rel="stylesheet" href="/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="/themes/buble.css" title="buble" disabled>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
alias: {
'.*?/awesome': 'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
'/de-de/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
'/ru/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
'/es/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
auto2top: true,
basePath: '/docs/',
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/docsifyjs/docsify/blob/master/docs/' + vm.route.file
}
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n\n----\n\n'
+ '<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
})
},
]
}
</script>
<script src="/lib/docsify.js"></script>
<script src="/lib/plugins/search.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
</body>
</html>

7
lerna.json Normal file
View file

@ -0,0 +1,7 @@
{
"lerna": "2.0.0-rc.5",
"packages": [
"packages/*"
],
"version": "0.0.0"
}

File diff suppressed because it is too large Load diff

2
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,284 +0,0 @@
this.D = this.D || {};
this.D.Search = (function () {
'use strict';
var INDEXS = {};
var CONFIG = {
placeholder: 'Type to search',
paths: 'auto',
maxAge: 86400000 // 1 day
};
var isObj = function (obj) {
return Object.prototype.toString.call(obj) === '[object Object]'
};
var escapeHtml = function (string) {
var entityMap = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
'/': '&#x2F;'
};
return String(string).replace(/[&<>"'\/]/g, function (s) { return entityMap[s]; })
};
/**
* find all filepath from A tag
*/
var getAllPaths = function () {
var paths = [];[].slice.call(document.querySelectorAll('a'))
.map(function (node) {
var href = node.href;
if (/#\/[^#]*?$/.test(href)) {
var path = href.replace(/^[^#]+#/, '');
if (paths.indexOf(path) <= 0) { paths.push(path); }
}
});
return paths
};
/**
* return file path
*/
var genFilePath = function (path) {
var basePath = window.$docsify.basePath;
var filePath = /\/$/.test(path) ? (path + "README.md") : (path + ".md");
filePath = basePath + filePath;
return filePath.replace(/\/+/g, '/')
};
/**
* generate index
*/
var genIndex = function (path, content) {
if ( content === void 0 ) content = '';
INDEXS[path] = { slug: '', title: '', body: '' };
var slug;
content
// remove PRE and TEMPLATE tag
.replace(/<template[^>]*?>[\s\S]+?<\/template>/g, '')
// find all html tag
.replace(/<(\w+)([^>]*?)>([\s\S]+?)<\//g, function (match, tag, attr, html) {
// remove all html tag
var text = html.replace(/<[^>]+>/g, '');
// tag is headline
if (/^h\d$/.test(tag)) {
// <h1 id="xxx"></h1>
var id = attr.match(/id="(\S+)"/)[1];
slug = ("#/" + path + "#" + id).replace(/\/+/, '/');
INDEXS[slug] = { slug: slug, title: text, body: '' };
} else {
// other html tag
if (!INDEXS[slug]) {
INDEXS[slug] = {};
} else {
if (INDEXS[slug].body && INDEXS[slug].body.length) {
INDEXS[slug].body += '\n' + text;
} else {
INDEXS[slug].body = text;
}
}
}
});
};
/**
* component
*/
var SearchComponent = function SearchComponent () {
if (this.rendered) { return }
this.style();
var el = document.createElement('div');
var aside = document.querySelector('aside');
el.classList.add('search');
aside.insertBefore(el, aside.children[0]);
this.render(el);
this.rendered = true;
this.bindEvent();
};
SearchComponent.prototype.style = function style () {
var code = "\n .sidebar {\n padding-top: 0;\n }\n\n .search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n }\n\n .search .results-panel {\n display: none;\n }\n\n .search .results-panel.show {\n display: block;\n }\n\n .search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n }\n\n .search h2 {\n font-size: 17px;\n margin: 10px 0;\n }\n\n .search a {\n text-decoration: none;\n color: inherit;\n }\n\n .search .matching-post {\n border-bottom: 1px solid #eee;\n }\n\n .search .matching-post:last-child {\n border-bottom: 0;\n }\n\n .search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n .search p.empty {\n text-align: center;\n }\n ";
var style = document.createElement('style');
style.innerHTML = code;
document.head.appendChild(style);
};
SearchComponent.prototype.render = function render (dom) {
dom.innerHTML = "<input type=\"search\" placeholder=\"" + (CONFIG.placeholder) + "\" /><div class=\"results-panel\"></div>";
};
SearchComponent.prototype.bindEvent = function bindEvent () {
var this$1 = this;
var input = document.querySelector('.search input');
var panel = document.querySelector('.results-panel');
input.addEventListener('input', function (e) {
var target = e.target;
if (target.value.trim() !== '') {
var matchingPosts = this$1.search(target.value);
var html = '';
matchingPosts.forEach(function (post, index) {
html += "\n <div class=\"matching-post\">\n <h2><a href=\"" + (post.url) + "\">" + (post.title) + "</a></h2>\n <p>" + (post.content) + "</p>\n </div>\n ";
});
if (panel.classList.contains('results-panel')) {
panel.classList.add('show');
panel.innerHTML = html || '<p class="empty">No Results!</p>';
}
} else {
if (panel.classList.contains('results-panel')) {
panel.classList.remove('show');
panel.innerHTML = '';
}
}
});
};
// From [weex website] https://weex-project.io/js/common.js
SearchComponent.prototype.search = function search (keywords) {
var matchingResults = [];
var data = Object.keys(INDEXS).map(function (key) { return INDEXS[key]; });
keywords = keywords.trim().split(/[\s\-\\\/]+/);
var loop = function ( i ) {
var post = data[i];
var isMatch = false;
var resultStr = '';
var postTitle = post.title && post.title.trim();
var postContent = post.body && post.body.trim();
var postUrl = post.slug || '';
if (postTitle !== '' && postContent !== '') {
keywords.forEach(function (keyword, i) {
var regEx = new RegExp(keyword, 'gi');
var indexTitle = -1;
var indexContent = -1;
indexTitle = postTitle.search(regEx);
indexContent = postContent.search(regEx);
if (indexTitle < 0 && indexContent < 0) {
isMatch = false;
} else {
isMatch = true;
if (indexContent < 0) { indexContent = 0; }
var start = 0;
var end = 0;
start = indexContent < 11 ? 0 : indexContent - 10;
end = start === 0 ? 70 : indexContent + keyword.length + 60;
if (end > postContent.length) { end = postContent.length; }
var matchContent = '...' +
postContent
.substring(start, end)
.replace(regEx, ("<em class=\"search-keyword\">" + keyword + "</em>")) +
'...';
resultStr += matchContent;
}
});
if (isMatch) {
var matchingPost = {
title: escapeHtml(postTitle),
content: resultStr,
url: postUrl
};
matchingResults.push(matchingPost);
}
}
};
for (var i = 0; i < data.length; i++) loop( i );
return matchingResults
};
var searchPlugin = function () {
var isAuto = CONFIG.paths === 'auto';
var isExpired = localStorage.getItem('docsify.search.expires') < Date.now();
INDEXS = JSON.parse(localStorage.getItem('docsify.search.index'));
if (isExpired) {
INDEXS = {};
} else if (!isAuto) {
return
}
var count = 0;
var paths = isAuto ? getAllPaths() : CONFIG.paths;
var len = paths.length;
var ref = window.Docsify.utils;
var load = ref.load;
var marked = ref.marked;
var slugify = ref.slugify;
var done = function () {
localStorage.setItem('docsify.search.expires', Date.now() + CONFIG.maxAge);
localStorage.setItem('docsify.search.index', JSON.stringify(INDEXS));
};
paths.forEach(function (path) {
if (INDEXS[path]) { return count++ }
load(genFilePath(path)).then(function (content) {
genIndex(path, marked(content));
slugify.clear();
count++;
if (len === count) { done(); }
});
});
};
var install = function () {
if (!window.Docsify || !window.Docsify.installed) {
console.error('[Docsify] Please load docsify.js first.');
return
}
window.$docsify.plugins = [].concat(window.$docsify.plugins, searchPlugin);
var userConfig = window.$docsify.search;
var isNil = window.Docsify.utils.isNil;
if (Array.isArray(userConfig)) {
CONFIG.paths = userConfig;
} else if (isObj(userConfig)) {
CONFIG.paths = Array.isArray(userConfig.paths) ? userConfig.paths : 'auto';
CONFIG.maxAge = isNil(userConfig.maxAge) ? CONFIG.maxAge : userConfig.maxAge;
CONFIG.placeholder = userConfig.placeholder || CONFIG.placeholder;
}
new SearchComponent();
};
var search = install();
return search;
}());

View file

@ -1 +0,0 @@
this.D=this.D||{},this.D.Search=function(){"use strict";var e={},n={placeholder:"Type to search",paths:"auto",maxAge:864e5},t=function(e){return"[object Object]"===Object.prototype.toString.call(e)},r=function(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(e).replace(/[&<>"'\/]/g,function(e){return n[e]})},i=function(){var e=[];return[].slice.call(document.querySelectorAll("a")).map(function(n){var t=n.href;if(/#\/[^#]*?$/.test(t)){var r=t.replace(/^[^#]+#/,"");e.indexOf(r)<=0&&e.push(r)}}),e},a=function(e){var n=window.$docsify.basePath,t=/\/$/.test(e)?e+"README.md":e+".md";return t=n+t,t.replace(/\/+/g,"/")},o=function(n,t){void 0===t&&(t=""),e[n]={slug:"",title:"",body:""};var r;t.replace(/<template[^>]*?>[\s\S]+?<\/template>/g,"").replace(/<(\w+)([^>]*?)>([\s\S]+?)<\//g,function(t,i,a,o){var s=o.replace(/<[^>]+>/g,"");if(/^h\d$/.test(i)){var c=a.match(/id="(\S+)"/)[1];r=("#/"+n+"#"+c).replace(/\/+/,"/"),e[r]={slug:r,title:s,body:""}}else e[r]?e[r].body&&e[r].body.length?e[r].body+="\n"+s:e[r].body=s:e[r]={}})},s=function(){if(!this.rendered){this.style();var e=document.createElement("div"),n=document.querySelector("aside");e.classList.add("search"),n.insertBefore(e,n.children[0]),this.render(e),this.rendered=!0,this.bindEvent()}};s.prototype.style=function e(){var n="\n .sidebar {\n padding-top: 0;\n }\n\n .search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n }\n\n .search .results-panel {\n display: none;\n }\n\n .search .results-panel.show {\n display: block;\n }\n\n .search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n }\n\n .search h2 {\n font-size: 17px;\n margin: 10px 0;\n }\n\n .search a {\n text-decoration: none;\n color: inherit;\n }\n\n .search .matching-post {\n border-bottom: 1px solid #eee;\n }\n\n .search .matching-post:last-child {\n border-bottom: 0;\n }\n\n .search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n .search p.empty {\n text-align: center;\n }\n ",e=document.createElement("style");e.innerHTML=n,document.head.appendChild(e)},s.prototype.render=function(e){e.innerHTML='<input type="search" placeholder="'+n.placeholder+'" /><div class="results-panel"></div>'},s.prototype.bindEvent=function(){var e=this,n=document.querySelector(".search input"),t=document.querySelector(".results-panel");n.addEventListener("input",function(n){var r=n.target;if(""!==r.value.trim()){var i=e.search(r.value),a="";i.forEach(function(e,n){a+='\n <div class="matching-post">\n <h2><a href="'+e.url+'">'+e.title+"</a></h2>\n <p>"+e.content+"</p>\n </div>\n "}),t.classList.contains("results-panel")&&(t.classList.add("show"),t.innerHTML=a||'<p class="empty">No Results!</p>')}else t.classList.contains("results-panel")&&(t.classList.remove("show"),t.innerHTML="")})},s.prototype.search=function(n){var t=[],i=Object.keys(e).map(function(n){return e[n]});n=n.trim().split(/[\s\-\\\\/]+/);for(var a=function(e){var a=i[e],o=!1,s="",c=a.title&&a.title.trim(),l=a.body&&a.body.trim(),d=a.slug||"";if(""!==c&&""!==l&&(n.forEach(function(e,n){var t=new RegExp(e,"gi"),r=-1,i=-1;if(r=c.search(t),i=l.search(t),r<0&&i<0)o=!1;else{o=!0,i<0&&(i=0);var a=0,d=0;a=i<11?0:i-10,d=0===a?70:i+e.length+60,d>l.length&&(d=l.length);var p="..."+l.substring(a,d).replace(t,'<em class="search-keyword">'+e+"</em>")+"...";s+=p}}),o)){var p={title:r(c),content:s,url:d};t.push(p)}},o=0;o<i.length;o++)a(o);return t};var c=function(){var t="auto"===n.paths,r=localStorage.getItem("docsify.search.expires")<Date.now();if(e=JSON.parse(localStorage.getItem("docsify.search.index")),r)e={};else if(!t)return;var s=0,c=t?i():n.paths,l=c.length,d=window.Docsify.utils,p=d.load,h=d.marked,u=d.slugify,f=function(){localStorage.setItem("docsify.search.expires",Date.now()+n.maxAge),localStorage.setItem("docsify.search.index",JSON.stringify(e))};c.forEach(function(n){return e[n]?s++:void p(a(n)).then(function(e){o(n,h(e)),u.clear(),s++,l===s&&f()})})},l=function(){if(!window.Docsify||!window.Docsify.installed)return void console.error("[Docsify] Please load docsify.js first.");window.$docsify.plugins=[].concat(window.$docsify.plugins,c);var e=window.$docsify.search,r=window.Docsify.utils.isNil;Array.isArray(e)?n.paths=e:t(e)&&(n.paths=Array.isArray(e.paths)?e.paths:"auto",n.maxAge=r(e.maxAge)?n.maxAge:e.maxAge,n.placeholder=e.placeholder||n.placeholder),new s},d=l();return d}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

8914
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,22 +1,78 @@
{
"name": "docsify",
"version": "2.1.0",
"version": "4.9.4",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
"email": "cinwell.li@gmail.com",
"url": "https://github.com/QingWei-Li"
},
"homepage": "https://docsify.js.org",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/docsifyjs/docsify.git"
},
"main": "lib/docsify.js",
"unpkg": "lib/docsify.min.js",
"files": [
"lib",
"src",
"themes"
],
"scripts": {
"build": "rm -rf lib themes && node build/build.js && mkdir lib/themes && mkdir themes && node build/build-css.js",
"dev:build": "rm -rf lib themes && mkdir themes && node build/build.js --dev && node build/build-css.js --dev",
"dev": "node app.js & nodemon -w src -e js,css --exec 'npm run dev:build'",
"test": "eslint src test"
"bootstrap": "npm i && lerna bootstrap && npm run build:ssr",
"serve": "node server",
"serve:ssr": "cross-env SSR=1 node server",
"dev": "run-p serve watch:*",
"dev:ssr": "run-p serve:ssr watch:*",
"lint": "eslint {src,packages} --fix",
"test": "mocha test/*/**",
"css": "stylus src/themes/*.styl -u autoprefixer-stylus",
"watch:css": "run-p 'css -- -o themes -w'",
"watch:js": "node build/build.js",
"build:css:min": "mkdir lib/themes && run-p 'css -- -o lib/themes' && node build/mincss.js",
"build:css": "mkdir -p themes && run-p 'css -- -o themes'",
"build:js": "cross-env NODE_ENV=production node build/build.js",
"build:ssr": "node build/ssr.js",
"build:cover": "node build/cover.js",
"build": "rimraf lib themes/* && run-s build:js build:css build:css:min build:ssr build:cover",
"pub:next": "cross-env RELEASE_TAG=next sh build/release.sh",
"pub": "sh build/release.sh",
"postinstall": "opencollective postinstall"
},
"repository": {
"type": "git",
"url": "https://github.com/QingWei-Li/docsify.git"
"dependencies": {
"marked": "^0.5.1",
"medium-zoom": "^0.4.0",
"opencollective": "^1.0.3",
"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.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-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"stylus": "^0.54.5"
},
"keywords": [
"doc",
@ -25,26 +81,9 @@
"creator",
"generator"
],
"author": "qingwei-li <cinwell.li@gmail.com> (https://github.com/QingWei-Li)",
"homepage": "https://docsify.js.org",
"license": "MIT",
"devDependencies": {
"cssnano": "^3.8.1",
"eslint": "^3.10.2",
"eslint-config-vue": "^2.0.1",
"eslint-plugin-vue": "^1.0.0",
"nodemon": "^1.11.0",
"postcss": "^5.2.6",
"postcss-salad": "^1.0.5",
"rollup": "^0.41.1",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^7.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-uglify": "^1.0.1",
"serve-static": "^1.11.1"
},
"dependencies": {
"marked": "^0.3.6",
"prismjs": "^1.5.1"
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/docsify",
"logo": "https://docsify.js.org/_media/icon.svg"
}
}

View file

@ -0,0 +1,4 @@
build.js
node_modules
*.log
.git

View file

@ -0,0 +1,46 @@
# docsify-server-renderer
## Install
```bash
yarn add docsify-server-renderer
```
## Usage
```js
var Renderer = require('docsify-server-renderer')
var readFileSync = require('fs').readFileSync
// init
var renderer = new Renderer({
template: readFileSync('./docs/index.template.html', 'utf-8').,
config: {
name: 'docsify',
repo: 'docsifyjs/docsify'
}
})
renderer.renderToString(url)
.then(html => {})
.catch(err => {})
```
*index.template.html*
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css" title="buble" disabled>
</head>
<body>
<!--inject-app-->
<!--inject-config-->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
</body>
</html>
```

View file

@ -0,0 +1,181 @@
import * as tpl from '../../src/core/render/tpl'
import fetch from 'node-fetch'
import {AbstractHistory} from '../../src/core/router/history/abstract'
import {Compiler} from '../../src/core/render/compiler'
import {isAbsolutePath} from '../../src/core/router/util'
import {readFileSync} from 'fs'
import {resolve, basename} from 'path'
import resolvePathname from 'resolve-pathname'
import debug from 'debug'
import {prerenderEmbed} from '../../src/core/render/embed'
function cwd(...args) {
return resolve(process.cwd(), ...args)
}
function mainTpl(config) {
let html = `<nav class="app-nav${
config.repo ? '' : ' no-badge'
}"><!--navbar--></nav>`
if (config.repo) {
html += tpl.corner(config.repo)
}
if (config.coverpage) {
html += tpl.cover()
}
html += tpl.main(config)
return html
}
export default class Renderer {
constructor({template, config, cache}) {
this.html = template
this.config = config = Object.assign({}, config, {
routerMode: 'history'
})
this.cache = cache
this.router = new AbstractHistory(config)
this.compiler = new Compiler(config, this.router)
this.router.getCurrentPath = () => this.url
this._renderHtml(
'inject-config',
`<script>window.$docsify = ${JSON.stringify(config)}</script>`
)
this._renderHtml('inject-app', mainTpl(config))
this.template = this.html
}
_getPath(url) {
const file = this.router.getFile(url)
return isAbsolutePath(file) ? file : cwd(`./${file}`)
}
async renderToString(url) {
this.url = url = this.router.parse(url).path
const {loadSidebar, loadNavbar, coverpage} = this.config
const mainFile = this._getPath(url)
this._renderHtml('main', await this._render(mainFile, 'main'))
if (loadSidebar) {
const name = loadSidebar === true ? '_sidebar.md' : loadSidebar
const sidebarFile = this._getPath(resolve(url, `./${name}`))
this._renderHtml('sidebar', await this._render(sidebarFile, 'sidebar'))
}
if (loadNavbar) {
const name = loadNavbar === true ? '_navbar.md' : loadNavbar
const navbarFile = this._getPath(resolve(url, `./${name}`))
this._renderHtml('navbar', await this._render(navbarFile, 'navbar'))
}
if (coverpage) {
let path = null
if (typeof coverpage === 'string') {
if (url === '/') {
path = coverpage
}
} else if (Array.isArray(coverpage)) {
path = coverpage.indexOf(url) > -1 && '_coverpage.md'
} else {
const cover = coverpage[url]
path = cover === true ? '_coverpage.md' : cover
}
const coverFile = this._getPath(resolve(url, `./${path}`))
this._renderHtml('cover', await this._render(coverFile), 'cover')
}
const html = this.html
this.html = this.template
return html
}
_renderHtml(match, content) {
this.html = this.html.replace(new RegExp(`<!--${match}-->`, 'g'), content)
return this.html
}
async _render(path, type) {
let html = await this._loadFile(path)
const {subMaxLevel, maxLevel} = this.config
let tokens
switch (type) {
case 'sidebar':
html =
this.compiler.sidebar(html, maxLevel) +
`<script>window.__SUB_SIDEBAR__ = ${JSON.stringify(
this.compiler.subSidebar(subMaxLevel)
)}</script>`
break
case 'cover':
html = this.compiler.cover(html)
break
case 'main':
tokens = await new Promise(r => {
prerenderEmbed(
{
fetch: url => this._loadFile(this._getPath(url)),
compiler: this.compiler,
raw: html
},
r
)
})
html = this.compiler.compile(tokens)
break
case 'navbar':
case 'article':
default:
html = this.compiler.compile(html)
break
}
return html
}
async _loadFile(filePath) {
debug('docsify')(`load > ${filePath}`)
let content
try {
if (isAbsolutePath(filePath)) {
const res = await fetch(filePath)
if (!res.ok) {
throw Error()
}
content = await res.text()
this.lock = 0
} else {
content = await readFileSync(filePath, 'utf8')
this.lock = 0
}
return content
} catch (e) {
this.lock = this.lock || 0
if (++this.lock > 10) {
this.lock = 0
return
}
const fileName = basename(filePath)
const result = await this._loadFile(
resolvePathname(`../${fileName}`, filePath)
)
return result
}
}
}
Renderer.version = '__VERSION__'

View file

@ -0,0 +1,41 @@
{
"lockfileVersion": 1,
"dependencies": {
"debug": {
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw="
},
"encoding": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s="
},
"iconv-lite": {
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz",
"integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA=="
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node-fetch": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz",
"integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ=="
},
"resolve-pathname": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.1.0.tgz",
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
}
},
"version": "4.9.4"
}

View file

@ -0,0 +1,23 @@
{
"name": "docsify-server-renderer",
"version": "4.9.4",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
"email": "cinwell.li@gmail.com",
"url": "https://github.com/QingWei-Li"
},
"homepage": "https://docsify.js.org",
"license": "MIT",
"repository": "docsifyjs/docsify",
"main": "build.js",
"scripts": {
"test": "echo 'hello'"
},
"dependencies": {
"debug": "^2.6.8",
"docsify": "^4.8.0",
"node-fetch": "^1.7.0",
"resolve-pathname": "^2.1.0"
}
}

55
server.js Normal file
View file

@ -0,0 +1,55 @@
const liveServer = require('live-server')
const isSSR = !!process.env.SSR
const middleware = []
if (isSSR) {
const Renderer = require('./packages/docsify-server-renderer/build.js')
const renderer = new Renderer({
template: `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/themes/vue.css" title="vue">
</head>
<body>
<!--inject-app-->
<!--inject-config-->
<script src="/lib/docsify.js"></script>
</body>
</html>`,
config: {
name: 'docsify',
repo: 'docsifyjs/docsify',
basePath: 'https://docsify.js.org/',
loadNavbar: true,
loadSidebar: true,
subMaxLevel: 3,
auto2top: true,
alias: {
'/de-de/changelog': '/changelog',
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG'
}
},
path: './'
})
middleware.push(function(req, res, next) {
if (/\.(css|js)$/.test(req.url)) {
return next()
}
renderer.renderToString(req.url).then(html => res.end(html))
})
}
const params = {
port: 3000,
watch: ['lib', 'docs', 'themes'],
middleware
}
liveServer.start(params)

71
src/core/config.js Normal file
View file

@ -0,0 +1,71 @@
import {merge, hyphenate, isPrimitive, hasOwn} from './util/core'
export default function () {
const config = merge(
{
el: '#app',
repo: '',
maxLevel: 6,
subMaxLevel: 0,
loadSidebar: null,
loadNavbar: null,
homepage: 'README.md',
coverpage: '',
basePath: '',
auto2top: false,
name: '',
themeColor: '',
nameLink: window.location.pathname,
autoHeader: false,
executeScript: null,
noEmoji: false,
ga: '',
ext: '.md',
mergeNavbar: false,
formatUpdated: '',
externalLinkTarget: '_blank',
routerMode: 'hash',
noCompileLinks: [],
relativePath: false
},
window.$docsify
)
const script =
document.currentScript ||
[].slice
.call(document.getElementsByTagName('script'))
.filter(n => /docsify\./.test(n.src))[0]
if (script) {
for (const prop in config) {
if (hasOwn.call(config, prop)) {
const val = script.getAttribute('data-' + hyphenate(prop))
if (isPrimitive(val)) {
config[prop] = val === '' ? true : val
}
}
}
if (config.loadSidebar === true) {
config.loadSidebar = '_sidebar' + config.ext
}
if (config.loadNavbar === true) {
config.loadNavbar = '_navbar' + config.ext
}
if (config.coverpage === true) {
config.coverpage = '_coverpage' + config.ext
}
if (config.repo === true) {
config.repo = ''
}
if (config.name === true) {
config.name = ''
}
}
window.$docsify = config
return config
}

26
src/core/event/index.js Normal file
View file

@ -0,0 +1,26 @@
import {isMobile} from '../util/env'
import {body, on} from '../util/dom'
import * as sidebar from './sidebar'
import {scrollIntoView} from './scroll'
export function eventMixin(proto) {
proto.$resetEvents = function () {
scrollIntoView(this.route.path, this.route.query.id)
if (this.config.loadNavbar) {
sidebar.getAndActive(this.router, 'nav')
}
}
}
export function initEvent(vm) {
// Bind toggle button
sidebar.btn('button.sidebar-toggle', vm.router)
sidebar.collapse('.sidebar', vm.router)
// Bind sticky effect
if (vm.config.coverpage) {
!isMobile && on('scroll', sidebar.sticky)
} else {
body.classList.add('sticky')
}
}

148
src/core/event/scroll.js Normal file
View file

@ -0,0 +1,148 @@
import {isMobile} from '../util/env'
import * as dom from '../util/dom'
import Tweezer from 'tweezer.js'
const nav = {}
let hoverOver = false
let scroller = null
let enableScrollEvent = true
let coverHeight = 0
function scrollTo(el) {
if (scroller) {
scroller.stop()
}
enableScrollEvent = false
scroller = new Tweezer({
start: window.pageYOffset,
end: el.getBoundingClientRect().top + window.pageYOffset,
duration: 500
})
.on('tick', v => window.scrollTo(0, v))
.on('done', () => {
enableScrollEvent = true
scroller = null
})
.begin()
}
function highlight(path) {
if (!enableScrollEvent) {
return
}
const sidebar = dom.getNode('.sidebar')
const anchors = dom.findAll('.anchor')
const wrap = dom.find(sidebar, '.sidebar-nav')
let active = dom.find(sidebar, 'li.active')
const doc = document.documentElement
const top = ((doc && doc.scrollTop) || document.body.scrollTop) - coverHeight
let last
for (let i = 0, len = anchors.length; i < len; i += 1) {
const node = anchors[i]
if (node.offsetTop > top) {
if (!last) {
last = node
}
break
} else {
last = node
}
}
if (!last) {
return
}
const li = nav[getNavKey(decodeURIComponent(path), last.getAttribute('data-id'))]
if (!li || li === active) {
return
}
active && active.classList.remove('active')
li.classList.add('active')
active = li
// Scroll into view
// https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L282-L297
if (!hoverOver && dom.body.classList.contains('sticky')) {
const height = sidebar.clientHeight
const curOffset = 0
const cur = active.offsetTop + active.clientHeight + 40
const isInView =
active.offsetTop >= wrap.scrollTop && cur <= wrap.scrollTop + height
const notThan = cur - curOffset < height
const top = isInView ? wrap.scrollTop : notThan ? curOffset : cur - height
sidebar.scrollTop = top
}
}
function getNavKey(path, id) {
return `${path}?id=${id}`
}
export function scrollActiveSidebar(router) {
const cover = dom.find('.cover.show')
coverHeight = cover ? cover.offsetHeight : 0
const sidebar = dom.getNode('.sidebar')
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]
const a = li.querySelector('a')
if (!a) {
continue
}
let href = a.getAttribute('href')
if (href !== '/') {
const {query: {id}, path} = router.parse(href)
if (id) {
href = getNavKey(path, id)
}
}
if (href) {
nav[decodeURIComponent(href)] = li
}
}
if (isMobile) {
return
}
const path = router.getCurrentPath()
dom.off('scroll', () => highlight(path))
dom.on('scroll', () => highlight(path))
dom.on(sidebar, 'mouseover', () => {
hoverOver = true
})
dom.on(sidebar, 'mouseleave', () => {
hoverOver = false
})
}
export function scrollIntoView(path, id) {
if (!id) {
return
}
const section = dom.find('#' + id)
section && scrollTo(section)
const li = nav[getNavKey(path, id)]
const sidebar = dom.getNode('.sidebar')
const active = dom.find(sidebar, 'li.active')
active && active.classList.remove('active')
li && li.classList.add('active')
}
const scrollEl = dom.$.scrollingElement || dom.$.documentElement
export function scroll2Top(offset = 0) {
scrollEl.scrollTop = offset === true ? 0 : Number(offset)
}

92
src/core/event/sidebar.js Normal file
View file

@ -0,0 +1,92 @@
import {isMobile} from '../util/env'
import * as dom from '../util/dom'
const title = dom.$.title
/**
* Toggle button
*/
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()
})
isMobile &&
dom.on(
dom.body,
'click',
_ => dom.body.classList.contains('close') && toggle()
)
}
export function collapse(el) {
el = dom.getNode(el)
if (el == null) {
return
}
dom.on(el, 'click', ({target}) => {
if (
target.nodeName === 'A' &&
target.nextSibling &&
target.nextSibling.classList.contains('app-sub-sidebar')
) {
dom.toggleClass(target.parentNode, 'collapse')
}
})
}
export function sticky() {
const cover = dom.getNode('section.cover')
if (!cover) {
return
}
const coverHeight = cover.getBoundingClientRect().height
if (window.pageYOffset >= coverHeight || cover.classList.contains('hidden')) {
dom.toggleClass(dom.body, 'add', 'sticky')
} else {
dom.toggleClass(dom.body, 'remove', 'sticky')
}
}
/**
* Get and active link
* @param {object} router
* @param {string|element} el
* @param {Boolean} isParent acitve parent
* @param {Boolean} autoTitle auto set title
* @return {element}
*/
export function getAndActive(router, el, isParent, autoTitle) {
el = dom.getNode(el)
let links = []
if (el != null) {
links = dom.findAll(el, 'a')
}
const hash = decodeURI(router.toURL(router.getCurrentPath()))
let target
links.sort((a, b) => b.href.length - a.href.length).forEach(a => {
const href = a.getAttribute('href')
const node = isParent ? a.parentNode : a
if (hash.indexOf(href) === 0 && !target) {
target = a
dom.toggleClass(node, 'add', 'active')
} else {
dom.toggleClass(node, 'remove', 'active')
}
})
if (autoTitle) {
dom.$.title = target ? (target.title || `${target.innerText} - ${title}`) : title
}
return target
}

67
src/core/fetch/ajax.js Normal file
View file

@ -0,0 +1,67 @@
import progressbar from '../render/progressbar'
import {noop, hasOwn} from '../util/core'
const cache = {}
/**
* Simple ajax get
* @param {string} url
* @param {boolean} [hasBar=false] has progress bar
* @return { then(resolve, reject), abort }
*/
export function get(url, hasBar = false, headers = {}) {
const xhr = new XMLHttpRequest()
const on = function () {
xhr.addEventListener.apply(xhr, arguments)
}
const cached = cache[url]
if (cached) {
return {then: cb => cb(cached.content, cached.opt), abort: noop}
}
xhr.open('GET', url)
for (const i in headers) {
if (hasOwn.call(headers, i)) {
xhr.setRequestHeader(i, headers[i])
}
}
xhr.send()
return {
then: function (success, error = noop) {
if (hasBar) {
const id = setInterval(
_ =>
progressbar({
step: Math.floor(Math.random() * 5 + 1)
}),
500
)
on('progress', progressbar)
on('loadend', evt => {
progressbar(evt)
clearInterval(id)
})
}
on('error', error)
on('load', ({target}) => {
if (target.status >= 400) {
error(target)
} else {
const result = (cache[url] = {
content: target.response,
opt: {
updatedAt: xhr.getResponseHeader('last-modified')
}
})
success(result.content, result.opt)
}
})
},
abort: _ => xhr.readyState !== 4 && xhr.abort()
}
}

235
src/core/fetch/index.js Normal file
View file

@ -0,0 +1,235 @@
import {get} from './ajax'
import {callHook} from '../init/lifecycle'
import {getParentPath, stringifyQuery} from '../router/util'
import {noop} from '../util/core'
import {getAndActive} from '../event/sidebar'
function loadNested(path, qs, file, next, vm, first) {
path = first ? path : path.replace(/\/$/, '')
path = getParentPath(path)
if (!path) {
return
}
get(
vm.router.getFile(path + file) + qs,
false,
vm.config.requestHeaders
).then(next, _ => loadNested(path, qs, file, next, vm))
}
export function fetchMixin(proto) {
let last
const abort = () => last && last.abort && last.abort()
const request = (url, hasbar, requestHeaders) => {
abort()
last = get(url, true, requestHeaders)
return last
}
const get404Path = (path, config) => {
const {notFoundPage, ext} = config
const defaultPath = '_404' + (ext || '.md')
let key
let path404
switch (typeof notFoundPage) {
case 'boolean':
path404 = defaultPath
break
case 'string':
path404 = notFoundPage
break
case 'object':
key = Object.keys(notFoundPage)
.sort((a, b) => b.length - a.length)
.find(key => path.match(new RegExp('^' + key)))
path404 = (key && notFoundPage[key]) || defaultPath
break
default:
break
}
return path404
}
proto._loadSideAndNav = function (path, qs, loadSidebar, cb) {
return () => {
if (!loadSidebar) {
return cb()
}
const fn = result => {
this._renderSidebar(result)
cb()
}
// Load sidebar
loadNested(path, qs, loadSidebar, fn, this, true)
}
}
proto._fetch = function (cb = noop) {
const {path, query} = this.route
const qs = stringifyQuery(query, ['id'])
const {loadNavbar, requestHeaders, loadSidebar} = this.config
// Abort last request
const file = this.router.getFile(path)
const req = request(file + qs, true, requestHeaders)
// Current page is html
this.isHTML = /\.html$/g.test(file)
// Load main content
req.then(
(text, opt) =>
this._renderMain(
text,
opt,
this._loadSideAndNav(path, qs, loadSidebar, cb)
),
_ => {
this._fetchFallbackPage(file, qs, cb) || this._fetch404(file, qs, cb)
}
)
// Load nav
loadNavbar &&
loadNested(
path,
qs,
loadNavbar,
text => this._renderNav(text),
this,
true
)
}
proto._fetchCover = function () {
const {coverpage, requestHeaders} = this.config
const query = this.route.query
const root = getParentPath(this.route.path)
if (coverpage) {
let path = null
const routePath = this.route.path
if (typeof coverpage === 'string') {
if (routePath === '/') {
path = coverpage
}
} else if (Array.isArray(coverpage)) {
path = coverpage.indexOf(routePath) > -1 && '_coverpage'
} else {
const cover = coverpage[routePath]
path = cover === true ? '_coverpage' : cover
}
const coverOnly = Boolean(path) && this.config.onlyCover
if (path) {
path = this.router.getFile(root + path)
this.coverIsHTML = /\.html$/g.test(path)
get(path + stringifyQuery(query, ['id']), false, requestHeaders).then(
text => this._renderCover(text, coverOnly)
)
} else {
this._renderCover(null, coverOnly)
}
return coverOnly
}
}
proto.$fetch = function (cb = noop) {
const done = () => {
callHook(this, 'doneEach')
cb()
}
const onlyCover = this._fetchCover()
if (onlyCover) {
done()
} else {
this._fetch(() => {
this.$resetEvents()
done()
})
}
}
proto._fetchFallbackPage = function (path, qs, cb = noop) {
const {requestHeaders, fallbackLanguages, loadSidebar} = this.config
if (!fallbackLanguages) {
return false
}
const local = path.split('/')[1]
if (fallbackLanguages.indexOf(local) === -1) {
return false
}
const newPath = path.replace(new RegExp(`^/${local}`), '')
const req = request(newPath + qs, true, requestHeaders)
req.then(
(text, opt) =>
this._renderMain(
text,
opt,
this._loadSideAndNav(path, qs, loadSidebar, cb)
),
() => this._fetch404(path, qs, cb)
)
return true
}
/**
* Load the 404 page
* @param path
* @param qs
* @param cb
* @returns {*}
* @private
*/
proto._fetch404 = function (path, qs, cb = noop) {
const {loadSidebar, requestHeaders, notFoundPage} = this.config
const fnLoadSideAndNav = this._loadSideAndNav(path, qs, loadSidebar, cb)
if (notFoundPage) {
const path404 = get404Path(path, this.config)
request(this.router.getFile(path404), true, requestHeaders).then(
(text, opt) => this._renderMain(text, opt, fnLoadSideAndNav),
() => this._renderMain(null, {}, fnLoadSideAndNav)
)
return true
}
this._renderMain(null, {}, fnLoadSideAndNav)
return false
}
}
export function initFetch(vm) {
const {loadSidebar} = vm.config
// Server-Side Rendering
if (vm.rendered) {
const activeEl = getAndActive(vm.router, '.sidebar-nav', true, true)
if (loadSidebar && activeEl) {
activeEl.parentNode.innerHTML += window.__SUB_SIDEBAR__
}
vm._bindEventOnRendered(activeEl)
vm.$resetEvents()
callHook(vm, 'doneEach')
callHook(vm, 'ready')
} else {
vm.$fetch(_ => callHook(vm, 'ready'))
}
}

20
src/core/global-api.js Normal file
View file

@ -0,0 +1,20 @@
import * as util from './util'
import * as dom from './util/dom'
import {Compiler} from './render/compiler'
import {slugify} from './render/slugify'
import {get} from './fetch/ajax'
import marked from 'marked'
import prism from 'prismjs'
export default function () {
window.Docsify = {
util,
dom,
get,
slugify,
version: '__VERSION__'
}
window.DocsifyCompiler = Compiler
window.marked = marked
window.Prism = prism
}

41
src/core/index.js Normal file
View file

@ -0,0 +1,41 @@
import {initMixin} from './init'
import {routerMixin} from './router'
import {renderMixin} from './render'
import {fetchMixin} from './fetch'
import {eventMixin} from './event'
import initGlobalAPI from './global-api'
/**
* Fork https://github.com/bendrucker/document-ready/blob/master/index.js
*/
function ready(callback) {
const state = document.readyState
if (state === 'complete' || state === 'interactive') {
return setTimeout(callback, 0)
}
document.addEventListener('DOMContentLoaded', callback)
}
function Docsify() {
this._init()
}
const proto = Docsify.prototype
initMixin(proto)
routerMixin(proto)
renderMixin(proto)
fetchMixin(proto)
eventMixin(proto)
/**
* Global API
*/
initGlobalAPI()
/**
* Run Docsify
*/
ready(_ => new Docsify())

27
src/core/init/index.js Normal file
View file

@ -0,0 +1,27 @@
import config from '../config'
import {initLifecycle, callHook} from './lifecycle'
import {initRender} from '../render'
import {initRouter} from '../router'
import {initEvent} from '../event'
import {initFetch} from '../fetch'
import {isFn} from '../util/core'
export function initMixin(proto) {
proto._init = function () {
const vm = this
vm.config = config()
initLifecycle(vm) // Init hooks
initPlugin(vm) // Install plugins
callHook(vm, 'init')
initRouter(vm) // Add router
initRender(vm) // Render base DOM
initEvent(vm) // Bind events
initFetch(vm) // Fetch data
callHook(vm, 'mounted')
}
}
function initPlugin(vm) {
[].concat(vm.config.plugins).forEach(fn => isFn(fn) && fn(vm._lifecycle, vm))
}

View file

@ -0,0 +1,45 @@
import {noop} from '../util/core'
export function initLifecycle(vm) {
const hooks = [
'init',
'mounted',
'beforeEach',
'afterEach',
'doneEach',
'ready'
]
vm._hooks = {}
vm._lifecycle = {}
hooks.forEach(hook => {
const arr = (vm._hooks[hook] = [])
vm._lifecycle[hook] = fn => arr.push(fn)
})
}
export function callHook(vm, hook, data, next = noop) {
const queue = vm._hooks[hook]
const step = function (index) {
const hook = queue[index]
if (index >= queue.length) {
next(data)
} else if (typeof hook === 'function') {
if (hook.length === 2) {
hook(data, result => {
data = result
step(index + 1)
})
} else {
const result = hook(data)
data = result === undefined ? data : result
step(index + 1)
}
} else {
step(index + 1)
}
}
step(0)
}

397
src/core/render/compiler.js Normal file
View file

@ -0,0 +1,397 @@
import marked from 'marked'
import Prism from 'prismjs'
import {helper as helperTpl, tree as treeTpl} from './tpl'
import {genTree} from './gen-tree'
import {slugify} from './slugify'
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 = '') {
const config = {}
if (str) {
str = str
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
config[key] = (value && value.replace(/&quot;/g, '')) || true
return ''
})
.trim()
}
return {str, config}
}
const compileMedia = {
markdown(url) {
return {
url
}
},
mermaid(url) {
return {
url
}
},
iframe(url, title) {
return {
html: `<iframe src="${url}" ${title || 'width=100% height=400'}></iframe>`
}
},
video(url, title) {
return {
html: `<video src="${url}" ${title || 'controls'}>Not Support</video>`
}
},
audio(url, title) {
return {
html: `<audio src="${url}" ${title || 'controls'}>Not Support</audio>`
}
},
code(url, title) {
let lang = url.match(/\.(\w+)$/)
lang = title || (lang && lang[1])
if (lang === 'md') {
lang = 'markdown'
}
return {
url,
lang
}
}
}
export class Compiler {
constructor(config, router) {
this.config = config
this.router = router
this.cacheTree = {}
this.toc = []
this.cacheTOC = {}
this.linkTarget = config.externalLinkTarget || '_blank'
this.contentBase = router.getBasePath()
const renderer = this._initRenderer()
let compile
const mdConf = config.markdown || {}
if (isFn(mdConf)) {
compile = mdConf(marked, renderer)
} else {
marked.setOptions(
merge(mdConf, {
renderer: merge(renderer, mdConf.renderer)
})
)
compile = marked
}
this._marked = compile
this.compile = text => {
let isCached = true
const result = cached(_ => {
isCached = false
let html = ''
if (!text) {
return text
}
if (isPrimitive(text)) {
html = compile(text)
} else {
html = compile.parser(text)
}
html = config.noEmoji ? html : emojify(html)
slugify.clear()
return html
})(text)
const curFileName = this.router.parse().file
if (isCached) {
this.toc = this.cacheTOC[curFileName]
} else {
this.cacheTOC[curFileName] = [...this.toc]
}
return result
}
}
compileEmbed(href, title) {
const {str, config} = getAndRemoveConfig(title)
let embed
title = str
if (config.include) {
if (!isAbsolutePath(href)) {
href = getPath(
process.env.SSR ? '' : this.contentBase,
getParentPath(this.router.getCurrentPath()),
href
)
}
let media
if (config.type && (media = compileMedia[config.type])) {
embed = media.call(this, href, title)
embed.type = config.type
} else {
let type = 'code'
if (/\.(md|markdown)/.test(href)) {
type = 'markdown'
} else if (/\.mmd/.test(href)) {
type = 'mermaid'
} else if (/\.html?/.test(href)) {
type = 'iframe'
} else if (/\.(mp4|ogg)/.test(href)) {
type = 'video'
} else if (/\.mp3/.test(href)) {
type = 'audio'
}
embed = compileMedia[type].call(this, href, title)
embed.type = type
}
embed.fragment = config.fragment
return embed
}
}
_matchNotCompileLink(link) {
const links = this.config.noCompileLinks || []
for (var i = 0; i < links.length; i++) {
const n = links[i]
const re = cachedLinks[n] || (cachedLinks[n] = new RegExp(`^${n}$`))
if (re.test(link)) {
return link
}
}
}
_initRenderer() {
const renderer = new marked.Renderer()
const {linkTarget, router, contentBase} = this
const _self = this
const origin = {}
/**
* Render anchor tag
* @link https://github.com/markedjs/marked#overriding-renderer-methods
*/
origin.heading = renderer.heading = function (text, level) {
let {str, config} = getAndRemoveConfig(text)
const nextToc = {level, title: str}
if (/{docsify-ignore}/g.test(str)) {
str = str.replace('{docsify-ignore}', '')
nextToc.title = str
nextToc.ignoreSubHeading = true
}
if (/{docsify-ignore-all}/g.test(str)) {
str = str.replace('{docsify-ignore-all}', '')
nextToc.title = str
nextToc.ignoreAllSubs = true
}
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>${str}</span></a></h${level}>`
}
// Highlight code
origin.code = renderer.code = function (code, lang = '') {
code = code.replace(/@DOCSIFY_QM@/g, '`')
const hl = Prism.highlight(
code,
Prism.languages[lang] || Prism.languages.markup
)
return `<pre v-pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
}
origin.link = renderer.link = function (href, title = '', text) {
let attrs = ''
const {str, config} = getAndRemoveConfig(title)
title = str
if (
!isAbsolutePath(href) &&
!_self._matchNotCompileLink(href) &&
!config.ignore
) {
if (href === _self.config.homepage) {
href = 'README'
}
href = router.toURL(href, null, router.getCurrentPath())
} else {
attrs += href.indexOf('mailto:') === 0 ? '' : ` target="${linkTarget}"`
}
if (config.target) {
attrs += ' target=' + config.target
}
if (config.disabled) {
attrs += ' disabled'
href = 'javascript:void(0)'
}
if (title) {
attrs += ` title="${title}"`
}
return `<a href="${href}"${attrs}>${text}</a>`
}
origin.paragraph = renderer.paragraph = function (text) {
let result
if (/^!&gt;/.test(text)) {
result = helperTpl('tip', text)
} else if (/^\?&gt;/.test(text)) {
result = helperTpl('warn', text)
} else {
result = `<p>${text}</p>`
}
return result
}
origin.image = renderer.image = function (href, title, text) {
let url = href
let attrs = ''
const {str, config} = getAndRemoveConfig(title)
title = str
if (config['no-zoom']) {
attrs += ' data-no-zoom'
}
if (title) {
attrs += ` title="${title}"`
}
const size = config.size
if (size) {
const sizes = size.split('x')
if (sizes[1]) {
attrs += 'width=' + sizes[0] + ' height=' + sizes[1]
} else {
attrs += 'width=' + sizes[0]
}
}
if (!isAbsolutePath(href)) {
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href)
}
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
return renderer
}
/**
* Compile sidebar
*/
sidebar(text, level) {
const {toc} = this
const currentPath = this.router.getCurrentPath()
let html = ''
if (text) {
html = this.compile(text)
} else {
for (let i = 0; i < toc.length; i++) {
if (toc[i].ignoreSubHeading) {
const deletedHeaderLevel = toc[i].level
toc.splice(i, 1)
// Remove headers who are under current header
for (let j = i; deletedHeaderLevel < toc[j].level && j < toc.length; j++) {
toc.splice(j, 1) && j-- && i++
}
i--
}
}
const tree = this.cacheTree[currentPath] || genTree(toc, level)
html = treeTpl(tree, '<ul>{inner}</ul>')
this.cacheTree[currentPath] = tree
}
return html
}
/**
* Compile sub sidebar
*/
subSidebar(level) {
if (!level) {
this.toc = []
return
}
const currentPath = this.router.getCurrentPath()
const {cacheTree, toc} = this
toc[0] && toc[0].ignoreAllSubs && toc.splice(0)
toc[0] && toc[0].level === 1 && toc.shift()
for (let i = 0; i < toc.length; i++) {
toc[i].ignoreSubHeading && toc.splice(i, 1) && i--
}
const tree = cacheTree[currentPath] || genTree(toc, level)
cacheTree[currentPath] = tree
this.toc = []
return treeTpl(tree)
}
article(text) {
return this.compile(text)
}
/**
* Compile cover page
*/
cover(text) {
const cacheToc = this.toc.slice()
const html = this.compile(text)
this.toc = cacheToc.slice()
return html
}
}

115
src/core/render/embed.js Normal file
View file

@ -0,0 +1,115 @@
import {get} from '../fetch/ajax'
import {merge} from '../util/core'
const cached = {}
function walkFetchEmbed({embedTokens, compile, fetch}, cb) {
let token
let step = 0
let count = 1
if (!embedTokens.length) {
return cb({})
}
while ((token = embedTokens[step++])) {
const next = (function (token) {
return text => {
let embedToken
if (text) {
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 +
'\n' +
text.replace(/`/g, '@DOCSIFY_QM@') +
'\n```\n'
)
} else if (token.embed.type === 'mermaid') {
embedToken = [
{type: 'html', text: `<div class="mermaid">\n${text}\n</div>`}
]
embedToken.links = {}
} else {
embedToken = [{type: 'html', text}]
embedToken.links = {}
}
}
cb({token, embedToken})
if (++count >= step) {
cb({})
}
}
})(token)
if (token.embed.url) {
if (process.env.SSR) {
fetch(token.embed.url).then(next)
} else {
get(token.embed.url).then(next)
}
} else {
next(token.embed.html)
}
}
}
export function prerenderEmbed({compiler, raw = '', fetch}, done) {
let hit = cached[raw]
if (hit) {
const copy = hit.slice()
copy.links = hit.links
return done(copy)
}
const compile = compiler._marked
let tokens = compile.lexer(raw)
const embedTokens = []
const linkRE = compile.InlineLexer.rules.link
const links = tokens.links
tokens.forEach((token, index) => {
if (token.type === 'paragraph') {
token.text = token.text.replace(
new RegExp(linkRE.source, 'g'),
(src, filename, href, title) => {
const embed = compiler.compileEmbed(href, title)
if (embed) {
embedTokens.push({
index,
embed
})
}
return src
}
)
}
})
let moveIndex = 0
walkFetchEmbed({compile, embedTokens, fetch}, ({embedToken, token}) => {
if (token) {
const index = token.index + moveIndex
merge(links, embedToken.links)
tokens = tokens
.slice(0, index)
.concat(embedToken, tokens.slice(index + 1))
moveIndex += embedToken.length - 1
} else {
cached[raw] = tokens.concat()
tokens.links = cached[raw].links = links
done(tokens)
}
})
}

View file

@ -0,0 +1,12 @@
import {inBrowser} from '../util/env'
function replace(m, $1) {
return '<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/' + $1 + '.png" alt="' + $1 + '" />'
}
export function emojify(text) {
return text
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, m => m.replace(/:/g, '__colon__'))
.replace(/:(\w+?):/ig, (inBrowser && window.emojify) || replace)
.replace(/__colon__/g, ':')
}

View file

@ -0,0 +1,28 @@
/**
* Gen toc tree
* @link https://github.com/killercup/grock/blob/5280ae63e16c5739e9233d9009bc235ed7d79a50/styles/solarized/assets/js/behavior.coffee#L54-L81
* @param {Array} toc
* @param {Number} maxLevel
* @return {Array}
*/
export function genTree(toc, maxLevel) {
const headlines = []
const last = {}
toc.forEach(headline => {
const level = headline.level || 1
const len = level - 1
if (level > maxLevel) {
return
}
if (last[len]) {
last[len].children = (last[len].children || []).concat(headline)
} else {
headlines.push(headline)
}
last[level] = headline
})
return headlines
}

276
src/core/render/index.js Normal file
View file

@ -0,0 +1,276 @@
import * as dom from '../util/dom'
import * as tpl from './tpl'
import cssVars from '../util/polyfill/css-vars'
import tinydate from 'tinydate'
import {callHook} from '../init/lifecycle'
import {Compiler} from './compiler'
import {getAndActive, sticky} from '../event/sidebar'
import {getPath, isAbsolutePath} from '../router/util'
import {isMobile, inBrowser} from '../util/env'
import {isPrimitive} from '../util/core'
import {scrollActiveSidebar, scroll2Top} from '../event/scroll'
import {prerenderEmbed} from './embed'
function executeScript() {
const script = dom
.findAll('.markdown-section>script')
.filter(s => !/template/.test(s.type))[0]
if (!script) {
return false
}
const code = script.innerText.trim()
if (!code) {
return false
}
setTimeout(_ => {
window.__EXECUTE_RESULT__ = new Function(code)()
}, 0)
}
function formatUpdated(html, updated, fn) {
updated =
typeof fn === 'function' ?
fn(updated) :
typeof fn === 'string' ?
tinydate(fn)(new Date(updated)) :
updated
return html.replace(/{docsify-updated}/g, updated)
}
function renderMain(html) {
if (!html) {
html = '<h1>404 - Not found</h1>'
}
this._renderTo('.markdown-section', html)
// Render sidebar with the TOC
!this.config.loadSidebar && this._renderSidebar()
// Execute script
if (
this.config.executeScript !== false &&
typeof window.Vue !== 'undefined' &&
!executeScript()
) {
setTimeout(_ => {
const vueVM = window.__EXECUTE_RESULT__
vueVM && vueVM.$destroy && vueVM.$destroy()
window.__EXECUTE_RESULT__ = new window.Vue().$mount('#main')
}, 0)
} else {
this.config.executeScript && executeScript()
}
}
function renderNameLink(vm) {
const el = dom.getNode('.app-name-link')
const nameLink = vm.config.nameLink
const path = vm.route.path
if (!el) {
return
}
if (isPrimitive(vm.config.nameLink)) {
el.setAttribute('href', nameLink)
} else if (typeof nameLink === 'object') {
const match = Object.keys(nameLink).filter(key => path.indexOf(key) > -1)[0]
el.setAttribute('href', nameLink[match])
}
}
export function renderMixin(proto) {
proto._renderTo = function (el, content, replace) {
const node = dom.getNode(el)
if (node) {
node[replace ? 'outerHTML' : 'innerHTML'] = content
}
}
proto._renderSidebar = function (text) {
const {maxLevel, subMaxLevel, loadSidebar} = this.config
this._renderTo('.sidebar-nav', this.compiler.sidebar(text, maxLevel))
const activeEl = getAndActive(this.router, '.sidebar-nav', true, true)
if (loadSidebar && activeEl) {
activeEl.parentNode.innerHTML +=
this.compiler.subSidebar(subMaxLevel) || ''
} else {
// Reset toc
this.compiler.subSidebar()
}
// Bind event
this._bindEventOnRendered(activeEl)
}
proto._bindEventOnRendered = function (activeEl) {
const {autoHeader, auto2top} = this.config
scrollActiveSidebar(this.router)
if (autoHeader && activeEl) {
const main = dom.getNode('#main')
const firstNode = main.children[0]
if (firstNode && firstNode.tagName !== 'H1') {
const h1 = dom.create('h1')
h1.innerText = activeEl.innerText
dom.before(main, h1)
}
}
auto2top && scroll2Top(auto2top)
}
proto._renderNav = function (text) {
text && this._renderTo('nav', this.compiler.compile(text))
if (this.config.loadNavbar) {
getAndActive(this.router, 'nav')
}
}
proto._renderMain = function (text, opt = {}, next) {
if (!text) {
return renderMain.call(this, text)
}
callHook(this, 'beforeEach', text, result => {
let html
const callback = () => {
if (opt.updatedAt) {
html = formatUpdated(html, opt.updatedAt, this.config.formatUpdated)
}
callHook(this, 'afterEach', html, text => renderMain.call(this, text))
}
if (this.isHTML) {
html = this.result = text
callback()
next()
} else {
prerenderEmbed(
{
compiler: this.compiler,
raw: result
},
tokens => {
html = this.compiler.compile(tokens)
callback()
next()
}
)
}
})
}
proto._renderCover = function (text, coverOnly) {
const el = dom.getNode('.cover')
dom.toggleClass(dom.getNode('main'), coverOnly ? 'add' : 'remove', 'hidden')
if (!text) {
dom.toggleClass(el, 'remove', 'show')
return
}
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>$')
if (m) {
if (m[2] === 'color') {
el.style.background = m[1] + (m[3] || '')
} else {
let path = m[1]
dom.toggleClass(el, 'add', 'has-mask')
if (!isAbsolutePath(m[1])) {
path = getPath(this.router.getBasePath(), m[1])
}
el.style.backgroundImage = `url(${path})`
el.style.backgroundSize = 'cover'
el.style.backgroundPosition = 'center center'
}
html = html.replace(m[0], '')
}
this._renderTo('.cover-main', html)
sticky()
}
proto._updateRender = function () {
// Render name link
renderNameLink(this)
}
}
export function initRender(vm) {
const config = vm.config
// Init markdown compiler
vm.compiler = new Compiler(config, vm.router)
if (inBrowser) {
window.__current_docsify_compiler__ = vm.compiler
}
const id = config.el || '#app'
const navEl = dom.find('nav') || dom.create('nav')
const el = dom.find(id)
let html = ''
let navAppendToTarget = dom.body
if (el) {
if (config.repo) {
html += tpl.corner(config.repo)
}
if (config.coverpage) {
html += tpl.cover()
}
if (config.logo) {
const isBase64 = /^data:image/.test(config.logo)
const isExternal = /(?:http[s]?:)?\/\//.test(config.logo)
const isRelative = /^\./.test(config.logo)
if (!isBase64 && !isExternal && !isRelative) {
config.logo = getPath(vm.router.getBasePath(), config.logo)
}
}
html += tpl.main(config)
// Render main app
vm._renderTo(el, html, true)
} else {
vm.rendered = true
}
if (config.mergeNavbar && isMobile) {
navAppendToTarget = dom.find('.sidebar')
} else {
navEl.classList.add('app-nav')
if (!config.repo) {
navEl.classList.add('no-badge')
}
}
// Add nav
if (config.loadNavbar) {
dom.before(navAppendToTarget, navEl)
}
if (config.themeColor) {
dom.$.head.appendChild(
dom.create('div', tpl.theme(config.themeColor)).firstElementChild
)
// Polyfll
cssVars(config.themeColor)
}
vm._updateRender()
dom.toggleClass(dom.body, 'ready')
}

View file

@ -0,0 +1,41 @@
import * as dom from '../util/dom'
let barEl
let timeId
/**
* Init progress component
*/
function init() {
const div = dom.create('div')
div.classList.add('progress')
dom.appendTo(dom.body, div)
barEl = div
}
/**
* Render progress bar
*/
export default function ({loaded, total, step}) {
let num
!barEl && init()
if (step) {
num = parseInt(barEl.style.width || 0, 10) + step
num = num > 80 ? 80 : num
} else {
num = Math.floor(loaded / total * 100)
}
barEl.style.opacity = 1
barEl.style.width = num >= 95 ? '100%' : num + '%'
if (num >= 95) {
clearTimeout(timeId)
timeId = setTimeout(_ => {
barEl.style.opacity = 0
barEl.style.width = '0%'
}, 200)
}
}

View file

@ -0,0 +1,37 @@
import {hasOwn} from '../util/core'
let cache = {}
const re = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g
function lower(string) {
return string.toLowerCase()
}
export function slugify(str) {
if (typeof str !== 'string') {
return ''
}
let slug = str
.trim()
.replace(/[A-Z]+/g, lower)
.replace(/<[^>\d]+>/g, '')
.replace(re, '')
.replace(/\s/g, '-')
.replace(/-+/g, '-')
.replace(/^(\d)/, '_$1')
let count = cache[slug]
count = hasOwn.call(cache, slug) ? count + 1 : 0
cache[slug] = count
if (count) {
slug = slug + '-' + count
}
return slug
}
slugify.clear = function () {
cache = {}
}

101
src/core/render/tpl.js Normal file
View file

@ -0,0 +1,101 @@
import {isMobile} from '../util/env'
/**
* Render github corner
* @param {Object} data
* @return {String}
*/
export function corner(data) {
if (!data) {
return ''
}
if (!/\/\//.test(data)) {
data = 'https://github.com/' + data
}
data = data.replace(/^git\+/, '')
return (
`<a href="${data}" class="github-corner" aria-label="View source on Github">` +
'<svg viewBox="0 0 250 250" aria-hidden="true">' +
'<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>' +
'<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>' +
'<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>' +
'</svg>' +
'</a>'
)
}
/**
* Render main content
*/
export function main(config) {
const aside =
'<button class="sidebar-toggle">' +
'<div class="sidebar-toggle-button">' +
'<span></span><span></span><span></span>' +
'</div>' +
'</button>' +
'<aside class="sidebar">' +
(config.name ?
`<h1 class="app-name"><a class="app-name-link" data-nosearch>${
config.logo ?
`<img alt=${config.name} src=${config.logo}>` :
config.name
}</a></h1>` :
'') +
'<div class="sidebar-nav"><!--sidebar--></div>' +
'</aside>'
return (
(isMobile ? `${aside}<main>` : `<main>${aside}`) +
'<section class="content">' +
'<article class="markdown-section" id="main"><!--main--></article>' +
'</section>' +
'</main>'
)
}
/**
* Cover Page
*/
export function cover() {
const SL = ', 100%, 85%'
const bgc =
'linear-gradient(to left bottom, ' +
`hsl(${Math.floor(Math.random() * 255) + SL}) 0%,` +
`hsl(${Math.floor(Math.random() * 255) + SL}) 100%)`
return (
`<section class="cover show" style="background: ${bgc}">` +
'<div class="cover-main"><!--cover--></div>' +
'<div class="mask"></div>' +
'</section>'
)
}
/**
* Render tree
* @param {Array} tree
* @param {String} tpl
* @return {String}
*/
export function tree(toc, tpl = '<ul class="app-sub-sidebar">{inner}</ul>') {
if (!toc || !toc.length) {
return ''
}
let innerHTML = ''
toc.forEach(node => {
innerHTML += `<li><a class="section-link" href="${node.slug}">${node.title}</a></li>`
if (node.children) {
innerHTML += tree(node.children, tpl)
}
})
return tpl.replace('{inner}', innerHTML)
}
export function helper(className, content) {
return `<p class="${className}">${content.slice(5).trim()}</p>`
}
export function theme(color) {
return `<style>:root{--theme-color: ${color};}</style>`
}

View file

@ -0,0 +1,25 @@
import {History} from './base'
import {parseQuery} from '../util'
export class AbstractHistory extends History {
constructor(config) {
super(config)
this.mode = 'abstract'
}
parse(path) {
let query = ''
const queryIndex = path.indexOf('?')
if (queryIndex >= 0) {
query = path.slice(queryIndex + 1)
path = path.slice(0, queryIndex)
}
return {
path,
file: this.getFile(path),
query: parseQuery(query)
}
}
}

View file

@ -0,0 +1,86 @@
import {
getPath,
isAbsolutePath,
stringifyQuery,
cleanPath,
replaceSlug,
resolvePath
} from '../util'
import {noop, merge} from '../../util/core'
const cached = {}
function getAlias(path, alias, last) {
const match = Object.keys(alias).filter(key => {
const re = cached[key] || (cached[key] = new RegExp(`^${key}$`))
return re.test(path) && path !== last
})[0]
return match ?
getAlias(path.replace(cached[match], alias[match]), alias, path) :
path
}
function getFileName(path, ext) {
return new RegExp(`\\.(${ext.replace(/^\./, '')}|html)$`, 'g').test(path) ?
path :
/\/$/g.test(path) ? `${path}README${ext}` : `${path}${ext}`
}
export class History {
constructor(config) {
this.config = config
}
getBasePath() {
return this.config.basePath
}
getFile(path = this.getCurrentPath(), isRelative) {
const {config} = this
const base = this.getBasePath()
const ext = typeof config.ext === 'string' ? config.ext : '.md'
path = config.alias ? getAlias(path, config.alias) : path
path = getFileName(path, ext)
path = path === `/README${ext}` ? config.homepage || path : path
path = isAbsolutePath(path) ? path : getPath(base, path)
if (isRelative) {
path = path.replace(new RegExp(`^${base}`), '')
}
return path
}
onchange(cb = noop) {
cb()
}
getCurrentPath() {}
normalize() {}
parse() {}
toURL(path, params, currentRoute) {
const local = currentRoute && path[0] === '#'
const route = this.parse(replaceSlug(path))
route.query = merge({}, route.query, params)
path = route.path + stringifyQuery(route.query)
path = path.replace(/\.md(\?)|\.md$/, '$1')
if (local) {
const idIndex = currentRoute.indexOf('?')
path =
(idIndex > 0 ? currentRoute.substring(0, idIndex) : currentRoute) + path
}
if (this.config.relativePath && path.indexOf('/') !== 0) {
const currentDir = currentRoute.substring(0, currentRoute.lastIndexOf('/') + 1)
return cleanPath(resolvePath(currentDir + path))
}
return cleanPath('/' + path)
}
}

View file

@ -0,0 +1,76 @@
import {History} from './base'
import {noop} from '../../util/core'
import {on} from '../../util/dom'
import {parseQuery, cleanPath, replaceSlug} from '../util'
function replaceHash(path) {
const i = location.href.indexOf('#')
location.replace(location.href.slice(0, i >= 0 ? i : 0) + '#' + path)
}
export class HashHistory extends History {
constructor(config) {
super(config)
this.mode = 'hash'
}
getBasePath() {
const path = window.location.pathname || ''
const base = this.config.basePath
return /^(\/|https?:)/g.test(base) ? base : cleanPath(path + '/' + base)
}
getCurrentPath() {
// We can't use location.hash here because it's not
// consistent across browsers - Firefox will pre-decode it!
const href = location.href
const index = href.indexOf('#')
return index === -1 ? '' : href.slice(index + 1)
}
onchange(cb = noop) {
on('hashchange', cb)
}
normalize() {
let path = this.getCurrentPath()
path = replaceSlug(path)
if (path.charAt(0) === '/') {
return replaceHash(path)
}
replaceHash('/' + path)
}
/**
* Parse the url
* @param {string} [path=location.herf]
* @return {object} { path, query }
*/
parse(path = location.href) {
let query = ''
const hashIndex = path.indexOf('#')
if (hashIndex >= 0) {
path = path.slice(hashIndex + 1)
}
const queryIndex = path.indexOf('?')
if (queryIndex >= 0) {
query = path.slice(queryIndex + 1)
path = path.slice(0, queryIndex)
}
return {
path,
file: this.getFile(path, true),
query: parseQuery(query)
}
}
toURL(path, params, currentRoute) {
return '#' + super.toURL(path, params, currentRoute)
}
}

View file

@ -0,0 +1,65 @@
import {History} from './base'
import {noop} from '../../util/core'
import {on} from '../../util/dom'
import {parseQuery, getPath} from '../util'
export class HTML5History extends History {
constructor(config) {
super(config)
this.mode = 'history'
}
getCurrentPath() {
const base = this.getBasePath()
let path = window.location.pathname
if (base && path.indexOf(base) === 0) {
path = path.slice(base.length)
}
return (path || '/') + window.location.search + window.location.hash
}
onchange(cb = noop) {
on('click', e => {
const el = e.target.tagName === 'A' ? e.target : e.target.parentNode
if (el.tagName === 'A' && !/_blank/.test(el.target)) {
e.preventDefault()
const url = el.href
window.history.pushState({key: url}, '', url)
cb()
}
})
on('popstate', cb)
}
/**
* Parse the url
* @param {string} [path=location.href]
* @return {object} { path, query }
*/
parse(path = location.href) {
let query = ''
const queryIndex = path.indexOf('?')
if (queryIndex >= 0) {
query = path.slice(queryIndex + 1)
path = path.slice(0, queryIndex)
}
const base = getPath(location.origin)
const baseIndex = path.indexOf(base)
if (baseIndex > -1) {
path = path.slice(baseIndex + base.length)
}
return {
path,
file: this.getFile(path),
query: parseQuery(query)
}
}
}

45
src/core/router/index.js Normal file
View file

@ -0,0 +1,45 @@
import {HashHistory} from './history/hash'
import {HTML5History} from './history/html5'
import {supportsPushState} from '../util/env'
import * as dom from '../util/dom'
export function routerMixin(proto) {
proto.route = {}
}
let lastRoute = {}
function updateRender(vm) {
vm.router.normalize()
vm.route = vm.router.parse()
dom.body.setAttribute('data-page', vm.route.file)
}
export function initRouter(vm) {
const config = vm.config
const mode = config.routerMode || 'hash'
let router
if (mode === 'history' && supportsPushState) {
router = new HTML5History(config)
} else {
router = new HashHistory(config)
}
vm.router = router
updateRender(vm)
lastRoute = vm.route
router.onchange(_ => {
updateRender(vm)
vm._updateRender()
if (lastRoute.path === vm.route.path) {
vm.$resetEvents()
return
}
vm.$fetch()
lastRoute = vm.route
})
}

76
src/core/router/util.js Normal file
View file

@ -0,0 +1,76 @@
import {cached} from '../util/core'
const decode = decodeURIComponent
const encode = encodeURIComponent
export function parseQuery(query) {
const res = {}
query = query.trim().replace(/^(\?|#|&)/, '')
if (!query) {
return res
}
// Simple parse
query.split('&').forEach(function (param) {
const parts = param.replace(/\+/g, ' ').split('=')
res[parts[0]] = parts[1] && decode(parts[1])
})
return res
}
export function stringifyQuery(obj, ignores = []) {
const qs = []
for (const key in obj) {
if (ignores.indexOf(key) > -1) {
continue
}
qs.push(
obj[key] ?
`${encode(key)}=${encode(obj[key])}`.toLowerCase() :
encode(key)
)
}
return qs.length ? `?${qs.join('&')}` : ''
}
export const isAbsolutePath = cached(path => {
return /(:|(\/{2}))/g.test(path)
})
export const getParentPath = cached(path => {
return /\/$/g.test(path) ?
path :
(path = path.match(/(\S*\/)[^/]+$/)) ? path[1] : ''
})
export const cleanPath = cached(path => {
return path.replace(/^\/+/, '/').replace(/([^:])\/{2,}/g, '$1/')
})
export const resolvePath = cached(path => {
const segments = path.replace(/^\//, '').split('/')
let resolved = []
for (let i = 0, len = segments.length; i < len; i++) {
const segment = segments[i]
if (segment === '..') {
resolved.pop()
} else if (segment !== '.') {
resolved.push(segment)
}
}
return '/' + resolved.join('/')
})
export function getPath(...args) {
return cleanPath(args.join('/'))
}
export const replaceSlug = cached(path => {
return path.replace('#', '?id=')
})

58
src/core/util/core.js Normal file
View file

@ -0,0 +1,58 @@
/**
* Create a cached version of a pure function.
*/
export function cached(fn) {
const cache = Object.create(null)
return function (str) {
const key = isPrimitive(str) ? str : JSON.stringify(str)
const hit = cache[key]
return hit || (cache[key] = fn(str))
}
}
/**
* Hyphenate a camelCase string.
*/
export const hyphenate = cached(str => {
return str.replace(/([A-Z])/g, m => '-' + m.toLowerCase())
})
export const hasOwn = Object.prototype.hasOwnProperty
/**
* Simple Object.assign polyfill
*/
export const merge =
Object.assign ||
function (to) {
for (let i = 1; i < arguments.length; i++) {
const from = Object(arguments[i])
for (const key in from) {
if (hasOwn.call(from, key)) {
to[key] = from[key]
}
}
}
return to
}
/**
* Check if value is primitive
*/
export function isPrimitive(value) {
return typeof value === 'string' || typeof value === 'number'
}
/**
* Perform no operation.
*/
export function noop() {}
/**
* Check if value is function
*/
export function isFn(obj) {
return typeof obj === 'function'
}

92
src/core/util/dom.js Normal file
View file

@ -0,0 +1,92 @@
import {isFn} from '../util/core'
import {inBrowser} from './env'
const cacheNode = {}
/**
* Get Node
* @param {String|Element} el
* @param {Boolean} noCache
* @return {Element}
*/
export function getNode(el, noCache = false) {
if (typeof el === 'string') {
if (typeof window.Vue !== 'undefined') {
return find(el)
}
el = noCache ? find(el) : cacheNode[el] || (cacheNode[el] = find(el))
}
return el
}
export const $ = inBrowser && document
export const body = inBrowser && $.body
export const head = inBrowser && $.head
/**
* Find element
* @example
* find('nav') => document.querySelector('nav')
* find(nav, 'a') => nav.querySelector('a')
*/
export function find(el, node) {
return node ? el.querySelector(node) : $.querySelector(el)
}
/**
* Find all elements
* @example
* findAll('a') => [].slice.call(document.querySelectorAll('a'))
* findAll(nav, 'a') => [].slice.call(nav.querySelectorAll('a'))
*/
export function findAll(el, node) {
return [].slice.call(
node ? el.querySelectorAll(node) : $.querySelectorAll(el)
)
}
export function create(node, tpl) {
node = $.createElement(node)
if (tpl) {
node.innerHTML = tpl
}
return node
}
export function appendTo(target, el) {
return target.appendChild(el)
}
export function before(target, el) {
return target.insertBefore(el, target.children[0])
}
export function on(el, type, handler) {
isFn(type) ?
window.addEventListener(el, type) :
el.addEventListener(type, handler)
}
export function off(el, type, handler) {
isFn(type) ?
window.removeEventListener(el, type) :
el.removeEventListener(type, handler)
}
/**
* Toggle class
*
* @example
* toggleClass(el, 'active') => el.classList.toggle('active')
* toggleClass(el, 'add', 'active') => el.classList.add('active')
*/
export function toggleClass(el, type, val) {
el && el.classList[val ? type : 'toggle'](val || type)
}
export function style(content) {
appendTo(head, create('style', content))
}

21
src/core/util/env.js Normal file
View file

@ -0,0 +1,21 @@
export const inBrowser = !process.env.SSR
export const isMobile = inBrowser && document.body.clientWidth <= 600
/**
* @see https://github.com/MoOx/pjax/blob/master/lib/is-supported.js
*/
export const supportsPushState =
inBrowser &&
(function () {
// Borrowed wholesale from https://github.com/defunkt/jquery-pjax
return (
window.history &&
window.history.pushState &&
window.history.replaceState &&
// PushState isnt reliable on iOS until 5.
!navigator.userAgent.match(
/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/
)
)
})()

3
src/core/util/index.js Normal file
View file

@ -0,0 +1,3 @@
export * from './core'
export * from './env'
export * from '../router/util'

View file

@ -0,0 +1,36 @@
import * as dom from '../dom'
import {get} from '../../fetch/ajax'
function replaceVar(block, color) {
block.innerHTML = block.innerHTML.replace(
/var\(\s*--theme-color.*?\)/g,
color
)
}
export default function (color) {
// Variable support
if (window.CSS && window.CSS.supports && window.CSS.supports('(--v:red)')) {
return
}
const styleBlocks = dom.findAll('style:not(.inserted),link');
[].forEach.call(styleBlocks, block => {
if (block.nodeName === 'STYLE') {
replaceVar(block, color)
} else if (block.nodeName === 'LINK') {
const href = block.getAttribute('href')
if (!/\.css$/.test(href)) {
return
}
get(href).then(res => {
const style = dom.create('style', res)
dom.head.appendChild(style)
replaceVar(style, color)
})
}
})
}

View file

@ -1,154 +0,0 @@
import { isMobile } from './util'
/**
* Active sidebar when scroll
* @link https://buble.surge.sh/
*/
export function scrollActiveSidebar () {
if (isMobile()) return
let hoveredOverSidebar = false
const anchors = document.querySelectorAll('.anchor')
const sidebar = document.querySelector('.sidebar')
const sidebarHeight = sidebar.clientHeight
const nav = {}
const lis = sidebar.querySelectorAll('li')
let active = sidebar.querySelector('li.active')
for (let i = 0, len = lis.length; i < len; i += 1) {
const li = lis[i]
let href = li.querySelector('a').getAttribute('href')
if (href !== '/') {
const match = href.match('#([^#]+)$')
if (match && match.length) href = match[0].slice(1)
}
nav[decodeURIComponent(href)] = li
}
function highlight () {
const top = document.body.scrollTop
let last
for (let i = 0, len = anchors.length; i < len; i += 1) {
const node = anchors[i]
if (node.offsetTop > top) {
if (!last) last = node
break
} else {
last = node
}
}
if (!last) return
const li = nav[last.getAttribute('data-id')]
if (!li || li === active) return
if (active) active.classList.remove('active')
li.classList.add('active')
active = li
// scroll into view
// https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L282-L297
if (!hoveredOverSidebar && !sticky.noSticky) {
const currentPageOffset = 0
const currentActiveOffset = active.offsetTop + active.clientHeight + 40
const currentActiveIsInView = (
active.offsetTop >= sidebar.scrollTop &&
currentActiveOffset <= sidebar.scrollTop + sidebarHeight
)
const linkNotFurtherThanSidebarHeight = currentActiveOffset - currentPageOffset < sidebarHeight
const newScrollTop = currentActiveIsInView
? sidebar.scrollTop
: linkNotFurtherThanSidebarHeight
? currentPageOffset
: currentActiveOffset - sidebarHeight
sidebar.scrollTop = newScrollTop
}
}
window.removeEventListener('scroll', highlight)
window.addEventListener('scroll', highlight)
sidebar.addEventListener('mouseover', () => { hoveredOverSidebar = true })
sidebar.addEventListener('mouseleave', () => { hoveredOverSidebar = false })
}
export function scrollIntoView () {
const id = window.location.hash.match(/#[^#\/]+$/g)
if (!id || !id.length) return
const section = document.querySelector(decodeURIComponent(id[0]))
if (section) setTimeout(() => section.scrollIntoView(), 0)
return section
}
/**
* Acitve link
*/
export function activeLink (dom, activeParent) {
const host = window.location.href
dom = typeof dom === 'object' ? dom : document.querySelector(dom)
if (!dom) return
let target
;[].slice.call(dom.querySelectorAll('a'))
.sort((a, b) => b.href.length - a.href.length)
.forEach(node => {
if (host.indexOf(node.href) === 0 && !target) {
activeParent
? node.parentNode.classList.add('active')
: node.classList.add('active')
target = node
} else {
activeParent
? node.parentNode.classList.remove('active')
: node.classList.remove('active')
}
})
return target
}
/**
* sidebar toggle
*/
export function bindToggle (dom) {
dom = typeof dom === 'object' ? dom : document.querySelector(dom)
if (!dom) return
const body = document.body
dom.addEventListener('click', () => body.classList.toggle('close'))
if (isMobile()) {
const sidebar = document.querySelector('.sidebar')
sidebar.addEventListener('click', () => {
body.classList.toggle('close')
setTimeout(() => activeLink(sidebar, true), 0)
})
}
}
export function scroll2Top (offset = 0) {
document.body.scrollTop = offset === true ? 0 : Number(offset)
}
export function sticky () {
sticky.dom = sticky.dom || document.querySelector('section.cover')
const coverHeight = sticky.dom.getBoundingClientRect().height
return (function () {
if (window.pageYOffset >= coverHeight || sticky.dom.classList.contains('hidden')) {
document.body.classList.add('sticky')
sticky.noSticky = false
} else {
document.body.classList.remove('sticky')
sticky.noSticky = true
}
})()
}

Some files were not shown because too many files have changed in this diff Show more