Compare commits

...

193 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
Jingjie Yang 杨竞颉
84f7b5c7c2 chore: typo (#392)
> Only coverpage is loaded when ~~When~~ visiting the home page.
2018-02-15 08:57:17 +08:00
167 changed files with 8983 additions and 18064 deletions

View file

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

View file

@ -1,15 +1,20 @@
{
"extends": [
"vue"
],
"parserOptions": {
"ecmaVersion": 8
},
"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
}
}

View file

@ -1,2 +0,0 @@
<!-- Love docsify? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate -->

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?

View file

@ -1,5 +1,54 @@
Please makes sure these boxes are checked before submitting your PR, thank you!
<!-- 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:**
---
* [ ] 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.

8
.gitignore vendored
View file

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

View file

@ -1,23 +1,234 @@
<a name="4.9.4"></a>
## [4.9.4](https://github.com/docsifyjs/docsify/compare/v4.9.2...v4.9.4) (2019-05-05)
<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
* re-render gitalk when router changed ([11ea1f8](https://github.com/docsifyjs/docsify/commit/11ea1f8))
### Features
* 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))
### Features
* **search-plugin:** add namespace option ([#706](https://github.com/docsifyjs/docsify/issues/706)) ([28beff8](https://github.com/docsifyjs/docsify/commit/28beff8))
* Add new theme "dolphin" ([#735](https://github.com/docsifyjs/docsify/issues/735)) ([c3345ba](https://github.com/docsifyjs/docsify/commit/c3345ba))
* Provide code fragments feature ([#748](https://github.com/docsifyjs/docsify/issues/748)) ([1447c8a](https://github.com/docsifyjs/docsify/commit/1447c8a))
<a name="4.8.6"></a>
## [4.8.6](https://github.com/docsifyjs/docsify/compare/v4.8.5...v4.8.6) (2018-11-12)
### Bug Fixes
* IE10 compatibility ([#691](https://github.com/docsifyjs/docsify/issues/691)) ([4db8cd6](https://github.com/docsifyjs/docsify/commit/4db8cd6))
<a name="4.8.5"></a>
## [4.8.5](https://github.com/docsifyjs/docsify/compare/v4.8.4...v4.8.5) (2018-11-02)
### Bug Fixes
* expose version info for Docsify, fixed [#641](https://github.com/docsifyjs/docsify/issues/641) ([aa719e3](https://github.com/docsifyjs/docsify/commit/aa719e3))
<a name="4.8.4"></a>
## [4.8.4](https://github.com/docsifyjs/docsify/compare/v4.8.3...v4.8.4) (2018-11-01)
### Bug Fixes
* **cover:** Compatible with legacy styles, fixed [#677](https://github.com/docsifyjs/docsify/issues/677) ([#678](https://github.com/docsifyjs/docsify/issues/678)) ([1a945d4](https://github.com/docsifyjs/docsify/commit/1a945d4))
<a name="4.8.3"></a>
## [4.8.3](https://github.com/docsifyjs/docsify/compare/v4.8.2...v4.8.3) (2018-11-01)
Fix the last release files has the old version marked...
<a name="4.8.2"></a>
## [4.8.2](https://github.com/docsifyjs/docsify/compare/v4.8.1...v4.8.2) (2018-11-01)
### Bug Fixes
- cover button style, fixed [#670](https://github.com/docsifyjs/docsify/issues/670), fixed [#665](https://github.com/docsifyjs/docsify/issues/665) ([#675](https://github.com/docsifyjs/docsify/issues/675)) ([fcd1087](https://github.com/docsifyjs/docsify/commit/fcd1087))
- update match regex ([#669](https://github.com/docsifyjs/docsify/issues/669)) ([2edf47e](https://github.com/docsifyjs/docsify/commit/2edf47e))
- use copy of cached value ([#668](https://github.com/docsifyjs/docsify/issues/668)) ([5fcf210](https://github.com/docsifyjs/docsify/commit/5fcf210))
- **compiler:** import prism-markup-templating, fixed [#672](https://github.com/docsifyjs/docsify/issues/672) ([#676](https://github.com/docsifyjs/docsify/issues/676)) ([fdd8826](https://github.com/docsifyjs/docsify/commit/fdd8826))
### Features
- add heading config id ([#671](https://github.com/docsifyjs/docsify/issues/671)) ([ab19b13](https://github.com/docsifyjs/docsify/commit/ab19b13))
<a name="4.8.1"></a>
## [4.8.1](https://github.com/docsifyjs/docsify/compare/v4.8.0...v4.8.1) (2018-10-31)
### Bug Fixes
- ssr package dep, fixed [#605](https://github.com/docsifyjs/docsify/issues/605) ([2bc880d](https://github.com/docsifyjs/docsify/commit/2bc880d))
- **compiler:** extra quotes for codeblock ([4f588e0](https://github.com/docsifyjs/docsify/commit/4f588e0))
- **compiler:** prevent render of html code in paragraph, fixed [#663](https://github.com/docsifyjs/docsify/issues/663) ([d35059d](https://github.com/docsifyjs/docsify/commit/d35059d))
### Features
- upgrade PrismJS, fixed [#534](https://github.com/docsifyjs/docsify/issues/534) ([4805cb5](https://github.com/docsifyjs/docsify/commit/4805cb5))
<a name="4.8.0"></a>
# [4.8.0](https://github.com/docsifyjs/docsify/compare/v4.7.1...v4.8.0) (2018-10-31)
### Bug Fixes
- Cache TOC for later usage in the case of cached file html ([#649](https://github.com/docsifyjs/docsify/issues/649)) ([9e86017](https://github.com/docsifyjs/docsify/commit/9e86017))
- improve external script plugin ([#632](https://github.com/docsifyjs/docsify/issues/632)) ([50c2434](https://github.com/docsifyjs/docsify/commit/50c2434))
- missing variable declaration ([#660](https://github.com/docsifyjs/docsify/issues/660)) ([1ce37bd](https://github.com/docsifyjs/docsify/commit/1ce37bd))
- Remove target for mailto links ([#652](https://github.com/docsifyjs/docsify/issues/652)) ([18f0f03](https://github.com/docsifyjs/docsify/commit/18f0f03))
- Update getAllPath query selector ([#653](https://github.com/docsifyjs/docsify/issues/653)) ([f6f4e32](https://github.com/docsifyjs/docsify/commit/f6f4e32))
- Update vue.styl ([#634](https://github.com/docsifyjs/docsify/issues/634)) ([bf060be](https://github.com/docsifyjs/docsify/commit/bf060be))
### Features
- Add docsify version to $window.docsify object ([#641](https://github.com/docsifyjs/docsify/issues/641)) ([94bc415](https://github.com/docsifyjs/docsify/commit/94bc415)), closes [#521](https://github.com/docsifyjs/docsify/issues/521)
- **compiler:** support embedded mermaid ([#629](https://github.com/docsifyjs/docsify/issues/629)) ([42ea8af](https://github.com/docsifyjs/docsify/commit/42ea8af))
- Add hideOtherSidebarContent option ([#661](https://github.com/docsifyjs/docsify/issues/661)) ([4a23c4a](https://github.com/docsifyjs/docsify/commit/4a23c4a))
- Allow base64, external, and relative logo values ([#642](https://github.com/docsifyjs/docsify/issues/642)) ([0a0802a](https://github.com/docsifyjs/docsify/commit/0a0802a)), closes [#577](https://github.com/docsifyjs/docsify/issues/577)
- upgrade marked to 0.5.x, fixed [#645](https://github.com/docsifyjs/docsify/issues/645), close [#644](https://github.com/docsifyjs/docsify/issues/644) ([#662](https://github.com/docsifyjs/docsify/issues/662)) ([a39b214](https://github.com/docsifyjs/docsify/commit/a39b214))
<a name="4.7.1"></a>
## [4.7.1](https://github.com/docsifyjs/docsify/compare/v4.7.0...v4.7.1) (2018-08-30)
<a name="4.7.0"></a>
# [4.7.0](https://github.com/QingWei-Li/docsify/compare/v4.6.9...v4.7.0) (2018-06-29)
### Bug Fixes
- alldow addition content in sidebar, fix [#518](https://github.com/QingWei-Li/docsify/issues/518), fix 539 ([#543](https://github.com/QingWei-Li/docsify/issues/543)) ([04b36b0](https://github.com/QingWei-Li/docsify/commit/04b36b0))
- async install config, fixed [#425](https://github.com/QingWei-Li/docsify/issues/425) ([e4e011c](https://github.com/QingWei-Li/docsify/commit/e4e011c))
- loading embed files synchronously, fixed [#525](https://github.com/QingWei-Li/docsify/issues/525), fixed [#527](https://github.com/QingWei-Li/docsify/issues/527) ([#544](https://github.com/QingWei-Li/docsify/issues/544)) ([feea7f9](https://github.com/QingWei-Li/docsify/commit/feea7f9))
- path include chinese character cause hilight bug ([#556](https://github.com/QingWei-Li/docsify/issues/556)) ([a5f333a](https://github.com/QingWei-Li/docsify/commit/a5f333a))
### Features
- add logo option, [#264](https://github.com/QingWei-Li/docsify/issues/264) ([#541](https://github.com/QingWei-Li/docsify/issues/541)) ([ee72dd0](https://github.com/QingWei-Li/docsify/commit/ee72dd0))
- add unpkg field, close [#531](https://github.com/QingWei-Li/docsify/issues/531) ([#558](https://github.com/QingWei-Li/docsify/issues/558)) ([5c0de0a](https://github.com/QingWei-Li/docsify/commit/5c0de0a))
- support image resizing, resolve [#508](https://github.com/QingWei-Li/docsify/issues/508) ([#545](https://github.com/QingWei-Li/docsify/issues/545)) ([3a7ad62](https://github.com/QingWei-Li/docsify/commit/3a7ad62))
<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))
### Features
- **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))
### Features
- **fetch:** Add fallback languages configuration. ([#402](https://github.com/QingWei-Li/docsify/issues/402)) ([ecc0e04](https://github.com/QingWei-Li/docsify/commit/ecc0e04))
<a name="4.6.3"></a>
## [4.6.3](https://github.com/QingWei-Li/docsify/compare/v4.6.2...v4.6.3) (2018-02-15)
### Bug Fixes
* **hook:** beforeEach don\'t work, fixed [#393](https://github.com/QingWei-Li/docsify/issues/393) ([6a09059](https://github.com/QingWei-Li/docsify/commit/6a09059))
- **hook:** beforeEach don\'t work, fixed [#393](https://github.com/QingWei-Li/docsify/issues/393) ([6a09059](https://github.com/QingWei-Li/docsify/commit/6a09059))
<a name="4.6.2"></a>
## [4.6.2](https://github.com/QingWei-Li/docsify/compare/v4.6.1...v4.6.2) (2018-02-14)
## [4.6.2](https://github.com/QingWei-Li/docsify/compare/v4.6.1...v4.6.2) (2018-02-14)
### Bug Fixes
* **embed:** broken in IE, fixed [#389](https://github.com/QingWei-Li/docsify/issues/389), fixed [#391](https://github.com/QingWei-Li/docsify/issues/391) ([45a7464](https://github.com/QingWei-Li/docsify/commit/45a7464))
* **embed:** init value ([890a7bf](https://github.com/QingWei-Li/docsify/commit/890a7bf))
- **embed:** broken in IE, fixed [#389](https://github.com/QingWei-Li/docsify/issues/389), fixed [#391](https://github.com/QingWei-Li/docsify/issues/391) ([45a7464](https://github.com/QingWei-Li/docsify/commit/45a7464))
- **embed:** init value ([890a7bf](https://github.com/QingWei-Li/docsify/commit/890a7bf))
<a name="4.6.1"></a>
@ -25,8 +236,8 @@
### Bug Fixes
* **embed** compatible ssr ([dc0c3ce](https://github.com/QingWei-Li/docsify/commit/dc0c3ce))
* **embed** async fetch embed files, fixed [#387](https://github.com/QingWei-Li/docsify/issues/387)
- **embed** compatible ssr ([dc0c3ce](https://github.com/QingWei-Li/docsify/commit/dc0c3ce))
- **embed** async fetch embed files, fixed [#387](https://github.com/QingWei-Li/docsify/issues/387)
<a name="4.6.0"></a>
@ -34,26 +245,26 @@
### Bug Fixes
* **search:** custom clear button, fixed [#271](https://github.com/QingWei-Li/docsify/issues/271) ([864aa18](https://github.com/QingWei-Li/docsify/commit/864aa18))
* **search:** escape special characters for search, fixed [#369](https://github.com/QingWei-Li/docsify/issues/369) ([9755439](https://github.com/QingWei-Li/docsify/commit/9755439))
* build config ([342438f](https://github.com/QingWei-Li/docsify/commit/342438f))
* button style for coverpage, fixed [#362](https://github.com/QingWei-Li/docsify/issues/362) ([85428ef](https://github.com/QingWei-Li/docsify/commit/85428ef))
* dropdown scroll style, fixed [#346](https://github.com/QingWei-Li/docsify/issues/346) ([c4d83f2](https://github.com/QingWei-Li/docsify/commit/c4d83f2))
* highlight homepage link, fixed [#304](https://github.com/QingWei-Li/docsify/issues/304) ([f960c19](https://github.com/QingWei-Li/docsify/commit/f960c19))
* homepage link ([e097f88](https://github.com/QingWei-Li/docsify/commit/e097f88))
* onlyCover ([033be4f](https://github.com/QingWei-Li/docsify/commit/033be4f))
* ssr compatible embedd ([ebc10c4](https://github.com/QingWei-Li/docsify/commit/ebc10c4))
* ssr coverpage, fixed [#273](https://github.com/QingWei-Li/docsify/issues/273) ([9e824a4](https://github.com/QingWei-Li/docsify/commit/9e824a4))
- **search:** custom clear button, fixed [#271](https://github.com/QingWei-Li/docsify/issues/271) ([864aa18](https://github.com/QingWei-Li/docsify/commit/864aa18))
- **search:** escape special characters for search, fixed [#369](https://github.com/QingWei-Li/docsify/issues/369) ([9755439](https://github.com/QingWei-Li/docsify/commit/9755439))
- build config ([342438f](https://github.com/QingWei-Li/docsify/commit/342438f))
- button style for coverpage, fixed [#362](https://github.com/QingWei-Li/docsify/issues/362) ([85428ef](https://github.com/QingWei-Li/docsify/commit/85428ef))
- dropdown scroll style, fixed [#346](https://github.com/QingWei-Li/docsify/issues/346) ([c4d83f2](https://github.com/QingWei-Li/docsify/commit/c4d83f2))
- highlight homepage link, fixed [#304](https://github.com/QingWei-Li/docsify/issues/304) ([f960c19](https://github.com/QingWei-Li/docsify/commit/f960c19))
- homepage link ([e097f88](https://github.com/QingWei-Li/docsify/commit/e097f88))
- onlyCover ([033be4f](https://github.com/QingWei-Li/docsify/commit/033be4f))
- ssr compatible embedd ([ebc10c4](https://github.com/QingWei-Li/docsify/commit/ebc10c4))
- ssr coverpage, fixed [#273](https://github.com/QingWei-Li/docsify/issues/273) ([9e824a4](https://github.com/QingWei-Li/docsify/commit/9e824a4))
### Features
* click sidebar menu add collapse and expand, close [#294](https://github.com/QingWei-Li/docsify/issues/294) ([5e161a1](https://github.com/QingWei-Li/docsify/commit/5e161a1))
* **compiler:** support embedded file as code block, close [#134](https://github.com/QingWei-Li/docsify/issues/134) ([761ccc2](https://github.com/QingWei-Li/docsify/commit/761ccc2))
* **compiler:** support embedded markdown, html, video, etc files, close [#383](https://github.com/QingWei-Li/docsify/issues/383), close [#333](https://github.com/QingWei-Li/docsify/issues/333) ([524f52f](https://github.com/QingWei-Li/docsify/commit/524f52f))
* **cover:** add onlyCover option, close [#382](https://github.com/QingWei-Li/docsify/issues/382) ([b265fdd](https://github.com/QingWei-Li/docsify/commit/b265fdd))
* **fetch:** add requestHeaders option, fixed [#336](https://github.com/QingWei-Li/docsify/issues/336) ([54ab4c9](https://github.com/QingWei-Li/docsify/commit/54ab4c9))
* **render:** add ext option for custom file extenstion, close [#340](https://github.com/QingWei-Li/docsify/issues/340) ([248aa72](https://github.com/QingWei-Li/docsify/commit/248aa72))
* **render:** mutilple coverpage, close [#315](https://github.com/QingWei-Li/docsify/issues/315) ([f68ddf5](https://github.com/QingWei-Li/docsify/commit/f68ddf5))
- click sidebar menu add collapse and expand, close [#294](https://github.com/QingWei-Li/docsify/issues/294) ([5e161a1](https://github.com/QingWei-Li/docsify/commit/5e161a1))
- **compiler:** support embedded file as code block, close [#134](https://github.com/QingWei-Li/docsify/issues/134) ([761ccc2](https://github.com/QingWei-Li/docsify/commit/761ccc2))
- **compiler:** support embedded markdown, html, video, etc files, close [#383](https://github.com/QingWei-Li/docsify/issues/383), close [#333](https://github.com/QingWei-Li/docsify/issues/333) ([524f52f](https://github.com/QingWei-Li/docsify/commit/524f52f))
- **cover:** add onlyCover option, close [#382](https://github.com/QingWei-Li/docsify/issues/382) ([b265fdd](https://github.com/QingWei-Li/docsify/commit/b265fdd))
- **fetch:** add requestHeaders option, fixed [#336](https://github.com/QingWei-Li/docsify/issues/336) ([54ab4c9](https://github.com/QingWei-Li/docsify/commit/54ab4c9))
- **render:** add ext option for custom file extenstion, close [#340](https://github.com/QingWei-Li/docsify/issues/340) ([248aa72](https://github.com/QingWei-Li/docsify/commit/248aa72))
- **render:** mutilple coverpage, close [#315](https://github.com/QingWei-Li/docsify/issues/315) ([f68ddf5](https://github.com/QingWei-Li/docsify/commit/f68ddf5))
<a name="4.5.9"></a>
@ -61,7 +272,7 @@
### Bug Fixes
* upgrade marked ([4157173](https://github.com/QingWei-Li/docsify/commit/4157173))
- upgrade marked ([4157173](https://github.com/QingWei-Li/docsify/commit/4157173))
<a name="4.5.8"></a>
@ -69,8 +280,8 @@
### Bug Fixes
* cover style, fixed [#381](https://github.com/QingWei-Li/docsify/issues/381) ([368754e](https://github.com/QingWei-Li/docsify/commit/368754e))
* updated deps ([#337](https://github.com/QingWei-Li/docsify/issues/337)) ([a12d393](https://github.com/QingWei-Li/docsify/commit/a12d393))
- cover style, fixed [#381](https://github.com/QingWei-Li/docsify/issues/381) ([368754e](https://github.com/QingWei-Li/docsify/commit/368754e))
- updated deps ([#337](https://github.com/QingWei-Li/docsify/issues/337)) ([a12d393](https://github.com/QingWei-Li/docsify/commit/a12d393))
<a name="4.5.7"></a>
@ -78,7 +289,7 @@
### Features
* add navigation plugin, closed [#180](https://github.com/QingWei-Li/docsify/issues/180) ([f78be4c](https://github.com/QingWei-Li/docsify/commit/f78be4c))
- add navigation plugin, closed [#180](https://github.com/QingWei-Li/docsify/issues/180) ([f78be4c](https://github.com/QingWei-Li/docsify/commit/f78be4c))
<a name="4.5.6"></a>
@ -86,7 +297,7 @@
### Bug Fixes
* **style:** increase the tap targets of menu button, fixed [#325](https://github.com/QingWei-Li/docsify/issues/325) ([888f217](https://github.com/QingWei-Li/docsify/commit/888f217))
- **style:** increase the tap targets of menu button, fixed [#325](https://github.com/QingWei-Li/docsify/issues/325) ([888f217](https://github.com/QingWei-Li/docsify/commit/888f217))
<a name="4.5.5"></a>
@ -94,7 +305,7 @@
### Bug Fixes
* disqus plugin issue ([#318](https://github.com/QingWei-Li/docsify/issues/318)) ([041b33e](https://github.com/QingWei-Li/docsify/commit/041b33e)), closes [#317](https://github.com/QingWei-Li/docsify/issues/317)
- disqus plugin issue ([#318](https://github.com/QingWei-Li/docsify/issues/318)) ([041b33e](https://github.com/QingWei-Li/docsify/commit/041b33e)), closes [#317](https://github.com/QingWei-Li/docsify/issues/317)
<a name="4.5.4"></a>
@ -102,11 +313,11 @@
### Bug Fixes
* **compiler:** task lists style, fixed [#215](https://github.com/QingWei-Li/docsify/issues/215) ([e43ded4](https://github.com/QingWei-Li/docsify/commit/e43ded4))
- **compiler:** task lists style, fixed [#215](https://github.com/QingWei-Li/docsify/issues/215) ([e43ded4](https://github.com/QingWei-Li/docsify/commit/e43ded4))
### Features
* add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
<a name="4.5.3"></a>
@ -114,7 +325,7 @@
### Features
* add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
- add gitalk plugin ([#306](https://github.com/QingWei-Li/docsify/issues/306)) ([9208e64](https://github.com/QingWei-Li/docsify/commit/9208e64))
<a name="4.5.2"></a>
@ -122,7 +333,7 @@
### Features
* github task lists, close [#215](https://github.com/QingWei-Li/docsify/issues/215) ([#305](https://github.com/QingWei-Li/docsify/issues/305)) ([d486eef](https://github.com/QingWei-Li/docsify/commit/d486eef))
- github task lists, close [#215](https://github.com/QingWei-Li/docsify/issues/215) ([#305](https://github.com/QingWei-Li/docsify/issues/305)) ([d486eef](https://github.com/QingWei-Li/docsify/commit/d486eef))
<a name="4.5.1"></a>
@ -130,7 +341,7 @@
### Features
* fetch files with the query params, fixed [#303](https://github.com/QingWei-Li/docsify/issues/303) ([2a2ed96](https://github.com/QingWei-Li/docsify/commit/2a2ed96))
- fetch files with the query params, fixed [#303](https://github.com/QingWei-Li/docsify/issues/303) ([2a2ed96](https://github.com/QingWei-Li/docsify/commit/2a2ed96))
<a name="4.5.0"></a>
@ -138,7 +349,7 @@
### Features
* add disqus plugin, closed [#123](https://github.com/QingWei-Li/docsify/issues/123) ([fd7d4e0](https://github.com/QingWei-Li/docsify/commit/fd7d4e0))
- add disqus plugin, closed [#123](https://github.com/QingWei-Li/docsify/issues/123) ([fd7d4e0](https://github.com/QingWei-Li/docsify/commit/fd7d4e0))
<a name="4.4.1"></a>
@ -146,8 +357,8 @@
### Bug Fixes
* {docsify-ignore-all} and {docsify-ignore} bug ([#299](https://github.com/QingWei-Li/docsify/issues/299)) ([cc98f56](https://github.com/QingWei-Li/docsify/commit/cc98f56))
* zoom image plugin issue, fixed [#187](https://github.com/QingWei-Li/docsify/issues/187) ([#300](https://github.com/QingWei-Li/docsify/issues/300)) ([fa772cf](https://github.com/QingWei-Li/docsify/commit/fa772cf))
- {docsify-ignore-all} and {docsify-ignore} bug ([#299](https://github.com/QingWei-Li/docsify/issues/299)) ([cc98f56](https://github.com/QingWei-Li/docsify/commit/cc98f56))
- zoom image plugin issue, fixed [#187](https://github.com/QingWei-Li/docsify/issues/187) ([#300](https://github.com/QingWei-Li/docsify/issues/300)) ([fa772cf](https://github.com/QingWei-Li/docsify/commit/fa772cf))
<a name="4.4.0"></a>
@ -155,11 +366,11 @@
### Bug Fixes
* sidebar style issue on firefox, fixed [#184](https://github.com/QingWei-Li/docsify/issues/184) ([#297](https://github.com/QingWei-Li/docsify/issues/297)) ([36bfc9d](https://github.com/QingWei-Li/docsify/commit/36bfc9d))
- sidebar style issue on firefox, fixed [#184](https://github.com/QingWei-Li/docsify/issues/184) ([#297](https://github.com/QingWei-Li/docsify/issues/297)) ([36bfc9d](https://github.com/QingWei-Li/docsify/commit/36bfc9d))
### Features
* add helper for disabled link, fixed [#295](https://github.com/QingWei-Li/docsify/issues/295) ([#296](https://github.com/QingWei-Li/docsify/issues/296)) ([4ad96f3](https://github.com/QingWei-Li/docsify/commit/4ad96f3))
- add helper for disabled link, fixed [#295](https://github.com/QingWei-Li/docsify/issues/295) ([#296](https://github.com/QingWei-Li/docsify/issues/296)) ([4ad96f3](https://github.com/QingWei-Li/docsify/commit/4ad96f3))
<a name="4.3.15"></a>
@ -167,7 +378,7 @@
### Bug Fixes
* scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
- scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
<a name="4.3.14"></a>
@ -175,7 +386,7 @@
### Bug Fixes
* codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
- codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
<a name="4.3.13"></a>
@ -183,11 +394,11 @@
### Bug Fixes
* duplicate results in search fixed [#257](https://github.com/QingWei-Li/docsify/issues/257) ([#284](https://github.com/QingWei-Li/docsify/issues/284)) ([3476f6f](https://github.com/QingWei-Li/docsify/commit/3476f6f))
- duplicate results in search fixed [#257](https://github.com/QingWei-Li/docsify/issues/257) ([#284](https://github.com/QingWei-Li/docsify/issues/284)) ([3476f6f](https://github.com/QingWei-Li/docsify/commit/3476f6f))
### Features
* make whole search result clickable ([#285](https://github.com/QingWei-Li/docsify/issues/285)) ([1b91227](https://github.com/QingWei-Li/docsify/commit/1b91227))
- make whole search result clickable ([#285](https://github.com/QingWei-Li/docsify/issues/285)) ([1b91227](https://github.com/QingWei-Li/docsify/commit/1b91227))
<a name="4.3.12"></a>
@ -195,7 +406,7 @@
### Bug Fixes
* incorrect active link ([#281](https://github.com/QingWei-Li/docsify/issues/281)) ([a3ab379](https://github.com/QingWei-Li/docsify/commit/a3ab379))
- incorrect active link ([#281](https://github.com/QingWei-Li/docsify/issues/281)) ([a3ab379](https://github.com/QingWei-Li/docsify/commit/a3ab379))
<a name="4.3.11"></a>
@ -203,7 +414,7 @@
### Bug Fixes
* broken links to same page heading, fix [#278](https://github.com/QingWei-Li/docsify/issues/278), fix [#279](https://github.com/QingWei-Li/docsify/issues/279) ([91d6337](https://github.com/QingWei-Li/docsify/commit/91d6337))
- broken links to same page heading, fix [#278](https://github.com/QingWei-Li/docsify/issues/278), fix [#279](https://github.com/QingWei-Li/docsify/issues/279) ([91d6337](https://github.com/QingWei-Li/docsify/commit/91d6337))
<a name="4.3.10"></a>
@ -211,7 +422,7 @@
### Bug Fixes
* link render issue after page refreshing ([#276](https://github.com/QingWei-Li/docsify/issues/276)) ([abd885e](https://github.com/QingWei-Li/docsify/commit/abd885e))
- link render issue after page refreshing ([#276](https://github.com/QingWei-Li/docsify/issues/276)) ([abd885e](https://github.com/QingWei-Li/docsify/commit/abd885e))
<a name="4.3.9"></a>
@ -219,7 +430,7 @@
### Bug Fixes
* scroll issue in IE ([#275](https://github.com/QingWei-Li/docsify/issues/275)) ([3e94cb6](https://github.com/QingWei-Li/docsify/commit/3e94cb6))
- scroll issue in IE ([#275](https://github.com/QingWei-Li/docsify/issues/275)) ([3e94cb6](https://github.com/QingWei-Li/docsify/commit/3e94cb6))
<a name="4.3.8"></a>
@ -227,7 +438,7 @@
### Bug Fixes
* **slugify:** GitHub compatible heading links, fixed [#272](https://github.com/QingWei-Li/docsify/issues/272) ([9b4e666](https://github.com/QingWei-Li/docsify/commit/9b4e666))
- **slugify:** GitHub compatible heading links, fixed [#272](https://github.com/QingWei-Li/docsify/issues/272) ([9b4e666](https://github.com/QingWei-Li/docsify/commit/9b4e666))
<a name="4.3.7"></a>
@ -235,7 +446,7 @@
### Bug Fixes
* **slugify:** GitHub compatible heading links, fixed [#267](https://github.com/QingWei-Li/docsify/issues/267) ([c195d2d](https://github.com/QingWei-Li/docsify/commit/c195d2d))
- **slugify:** GitHub compatible heading links, fixed [#267](https://github.com/QingWei-Li/docsify/issues/267) ([c195d2d](https://github.com/QingWei-Li/docsify/commit/c195d2d))
<a name="4.3.6"></a>
@ -243,7 +454,7 @@
### Bug Fixes
* style for codesponsor plugin ([08afec7](https://github.com/QingWei-Li/docsify/commit/08afec7))
- style for codesponsor plugin ([08afec7](https://github.com/QingWei-Li/docsify/commit/08afec7))
<a name="4.3.5"></a>
@ -251,11 +462,11 @@
### Bug Fixes
* missed symbol ([#254](https://github.com/QingWei-Li/docsify/issues/254)) ([6c702d3](https://github.com/QingWei-Li/docsify/commit/6c702d3))
- missed symbol ([#254](https://github.com/QingWei-Li/docsify/issues/254)) ([6c702d3](https://github.com/QingWei-Li/docsify/commit/6c702d3))
### Features
* **plugin:** add codesponsor plugin ([46ac4c3](https://github.com/QingWei-Li/docsify/commit/46ac4c3))
- **plugin:** add codesponsor plugin ([46ac4c3](https://github.com/QingWei-Li/docsify/commit/46ac4c3))
<a name="4.3.4"></a>
@ -263,7 +474,7 @@
### Bug Fixes
* scroll position issue, fixed [#234](https://github.com/QingWei-Li/docsify/issues/234) ([388ed3d](https://github.com/QingWei-Li/docsify/commit/388ed3d))
- scroll position issue, fixed [#234](https://github.com/QingWei-Li/docsify/issues/234) ([388ed3d](https://github.com/QingWei-Li/docsify/commit/388ed3d))
<a name="4.3.3"></a>
@ -271,11 +482,11 @@
### Bug Fixes
* **buble.css:** tweaks code block style, fixed [#249](https://github.com/QingWei-Li/docsify/issues/249) ([9d43051](https://github.com/QingWei-Li/docsify/commit/9d43051))
- **buble.css:** tweaks code block style, fixed [#249](https://github.com/QingWei-Li/docsify/issues/249) ([9d43051](https://github.com/QingWei-Li/docsify/commit/9d43051))
### Features
* add doc for react and vue demo box plugin ([#247](https://github.com/QingWei-Li/docsify/issues/247)) ([f0aca19](https://github.com/QingWei-Li/docsify/commit/f0aca19))
- add doc for react and vue demo box plugin ([#247](https://github.com/QingWei-Li/docsify/issues/247)) ([f0aca19](https://github.com/QingWei-Li/docsify/commit/f0aca19))
<a name="4.3.2"></a>
@ -283,11 +494,11 @@
### Bug Fixes
* sidebar highlight ([f82f419](https://github.com/QingWei-Li/docsify/commit/f82f419))
- sidebar highlight ([f82f419](https://github.com/QingWei-Li/docsify/commit/f82f419))
### Features
* add Edit on github plugin (thanks [@njleonzhang](https://github.com/njleonzhang)) ([a0e1ea8](https://github.com/QingWei-Li/docsify/commit/a0e1ea8))
- add Edit on github plugin (thanks [@njleonzhang](https://github.com/njleonzhang)) ([a0e1ea8](https://github.com/QingWei-Li/docsify/commit/a0e1ea8))
<a name="4.3.1"></a>
@ -295,7 +506,7 @@
### Features
* **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
- **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
<a name="4.3.0"></a>
@ -303,7 +514,7 @@
### Features
* **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
- **markdown:** supports mermaid [#137](https://github.com/QingWei-Li/docsify/issues/137) ([f4800e0](https://github.com/QingWei-Li/docsify/commit/f4800e0))
<a name="4.2.9"></a>
@ -311,7 +522,7 @@
### Bug Fixes
* ensure document ready before init Docsify [#233](https://github.com/QingWei-Li/docsify/issues/233)
- ensure document ready before init Docsify [#233](https://github.com/QingWei-Li/docsify/issues/233)
<a name="4.2.8"></a>
@ -319,7 +530,7 @@
### Features
* **compiler:** support for setting target attribute for link, fixed [#230](https://github.com/QingWei-Li/docsify/issues/230) ([7f270f9](https://github.com/QingWei-Li/docsify/commit/7f270f9))
- **compiler:** support for setting target attribute for link, fixed [#230](https://github.com/QingWei-Li/docsify/issues/230) ([7f270f9](https://github.com/QingWei-Li/docsify/commit/7f270f9))
<a name="4.2.7"></a>
@ -327,8 +538,8 @@
### Bug Fixes
* **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
* **style:** nowrap => pre-wrap, fixed [#228](https://github.com/QingWei-Li/docsify/issues/228) ([a88252c](https://github.com/QingWei-Li/docsify/commit/a88252c))
- **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
- **style:** nowrap => pre-wrap, fixed [#228](https://github.com/QingWei-Li/docsify/issues/228) ([a88252c](https://github.com/QingWei-Li/docsify/commit/a88252c))
<a name="4.2.6"></a>
@ -336,8 +547,8 @@
### Bug Fixes
* **css:** hide the nav when the content has not yet been loaded ([1fa1619](https://github.com/QingWei-Li/docsify/commit/1fa1619))
* **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
- **css:** hide the nav when the content has not yet been loaded ([1fa1619](https://github.com/QingWei-Li/docsify/commit/1fa1619))
- **release:** release shell ([628e211](https://github.com/QingWei-Li/docsify/commit/628e211))
<a name="4.2.4"></a>
@ -345,7 +556,7 @@
### Bug Fixes
* **render:** Remove getRootNode to be compatible with the lower version of Chrome, fixed [#225](https://github.com/QingWei-Li/docsify/issues/225) ([b8dd346](https://github.com/QingWei-Li/docsify/commit/b8dd346))
- **render:** Remove getRootNode to be compatible with the lower version of Chrome, fixed [#225](https://github.com/QingWei-Li/docsify/issues/225) ([b8dd346](https://github.com/QingWei-Li/docsify/commit/b8dd346))
<a name="4.2.3"></a>
@ -353,7 +564,7 @@
### Features
* **search:** Supports the max depth of the search headline, fixed [#223](https://github.com/QingWei-Li/docsify/issues/223), resolve [#129](https://github.com/QingWei-Li/docsify/issues/129) ([b7b589b](https://github.com/QingWei-Li/docsify/commit/b7b589b))
- **search:** Supports the max depth of the search headline, fixed [#223](https://github.com/QingWei-Li/docsify/issues/223), resolve [#129](https://github.com/QingWei-Li/docsify/issues/129) ([b7b589b](https://github.com/QingWei-Li/docsify/commit/b7b589b))
<a name="4.2.2"></a>
@ -361,14 +572,14 @@
### Bug Fixes
* style rerender due to setting themeColor ([17ff3d1](https://github.com/QingWei-Li/docsify/commit/17ff3d1))
- style rerender due to setting themeColor ([17ff3d1](https://github.com/QingWei-Li/docsify/commit/17ff3d1))
<a name="4.2.1"></a>
## [4.2.1](https://github.com/QingWei-Li/docsify/compare/v4.2.0...v4.2.1) (2017-07-19)
* give the navbar some line-height (#216)
* Remove unnecessary moduleName option from rollup config for plugins (#209)
- give the navbar some line-height (#216)
- Remove unnecessary moduleName option from rollup config for plugins (#209)
<a name="4.2.0"></a>
@ -376,12 +587,12 @@
### Bug Fixes
* not found page ([9af8559](https://github.com/QingWei-Li/docsify/commit/9af8559))
- not found page ([9af8559](https://github.com/QingWei-Li/docsify/commit/9af8559))
### Features
* alias option supports regexp, resolve [#183](https://github.com/QingWei-Li/docsify/issues/183) ([c4aa22c](https://github.com/QingWei-Li/docsify/commit/c4aa22c))
* ignore to compiled link, fixed [#203](https://github.com/QingWei-Li/docsify/issues/203) ([#204](https://github.com/QingWei-Li/docsify/issues/204)) ([2e00f4c](https://github.com/QingWei-Li/docsify/commit/2e00f4c))
- alias option supports regexp, resolve [#183](https://github.com/QingWei-Li/docsify/issues/183) ([c4aa22c](https://github.com/QingWei-Li/docsify/commit/c4aa22c))
- ignore to compiled link, fixed [#203](https://github.com/QingWei-Li/docsify/issues/203) ([#204](https://github.com/QingWei-Li/docsify/issues/204)) ([2e00f4c](https://github.com/QingWei-Li/docsify/commit/2e00f4c))
<a name="4.1.14"></a>
@ -389,11 +600,11 @@
### Bug Fixes
* get file path, fixed jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070 ([e8117e5](https://github.com/QingWei-Li/docsify/commit/e8117e5)), closes [jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070](https://github.com/jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13/issues/commitcomment-22427070)
- get file path, fixed jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070 ([e8117e5](https://github.com/QingWei-Li/docsify/commit/e8117e5)), closes [jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13#commitcomment-22427070](https://github.com/jrappen/sublime-distractionless/commit/81bfadd391428823191cc03eca956a2312e04d13/issues/commitcomment-22427070)
### Features
* add context attribute, fixed [#191](https://github.com/QingWei-Li/docsify/issues/191) ([ce0e9ac](https://github.com/QingWei-Li/docsify/commit/ce0e9ac))
- add context attribute, fixed [#191](https://github.com/QingWei-Li/docsify/issues/191) ([ce0e9ac](https://github.com/QingWei-Li/docsify/commit/ce0e9ac))
<a name="4.1.13"></a>
@ -405,7 +616,7 @@
### Bug Fixes
* **render:** subtitle in side bar shows undefined, fixed [#182](https://github.com/QingWei-Li/docsify/issues/182) ([d087d57](https://github.com/QingWei-Li/docsify/commit/d087d57))
- **render:** subtitle in side bar shows undefined, fixed [#182](https://github.com/QingWei-Li/docsify/issues/182) ([d087d57](https://github.com/QingWei-Li/docsify/commit/d087d57))
<a name="4.1.11"></a>
@ -413,8 +624,8 @@
### Bug Fixes
* **compiler:** force reset toc when rendering sidebar fixed [#181](https://github.com/QingWei-Li/docsify/issues/181) ([ccf4c7c](https://github.com/QingWei-Li/docsify/commit/ccf4c7c))
* **render:** autoHeader does not work ([1304d2e](https://github.com/QingWei-Li/docsify/commit/1304d2e))
- **compiler:** force reset toc when rendering sidebar fixed [#181](https://github.com/QingWei-Li/docsify/issues/181) ([ccf4c7c](https://github.com/QingWei-Li/docsify/commit/ccf4c7c))
- **render:** autoHeader does not work ([1304d2e](https://github.com/QingWei-Li/docsify/commit/1304d2e))
<a name="4.1.10"></a>
@ -422,7 +633,7 @@
### Bug Fixes
* **hash:** hash routing crashes when url has querystring ([6d48ce1](https://github.com/QingWei-Li/docsify/commit/6d48ce1))
- **hash:** hash routing crashes when url has querystring ([6d48ce1](https://github.com/QingWei-Li/docsify/commit/6d48ce1))
<a name="4.1.9"></a>
@ -430,9 +641,9 @@
### Bug Fixes
* can't render toc on first load ([d9b487e](https://github.com/QingWei-Li/docsify/commit/d9b487e))
* **lifecycle:** continue to handle data ([955d3d5](https://github.com/QingWei-Li/docsify/commit/955d3d5))
* **render:** broken name link, fixed [#167](https://github.com/QingWei-Li/docsify/issues/167) ([91b66a5](https://github.com/QingWei-Li/docsify/commit/91b66a5))
- can't render toc on first load ([d9b487e](https://github.com/QingWei-Li/docsify/commit/d9b487e))
- **lifecycle:** continue to handle data ([955d3d5](https://github.com/QingWei-Li/docsify/commit/955d3d5))
- **render:** broken name link, fixed [#167](https://github.com/QingWei-Li/docsify/issues/167) ([91b66a5](https://github.com/QingWei-Li/docsify/commit/91b66a5))
<a name="4.1.8"></a>
@ -440,13 +651,13 @@
### Bug Fixes
* auto replace version ([22b50f0](https://github.com/QingWei-Li/docsify/commit/22b50f0))
* update edit button demo ([ec887c1](https://github.com/QingWei-Li/docsify/commit/ec887c1))
- auto replace version ([22b50f0](https://github.com/QingWei-Li/docsify/commit/22b50f0))
- update edit button demo ([ec887c1](https://github.com/QingWei-Li/docsify/commit/ec887c1))
### Features
* add edit button demo ([a64cee1](https://github.com/QingWei-Li/docsify/commit/a64cee1))
* add edit button demo, close [#162](https://github.com/QingWei-Li/docsify/issues/162) ([036fdac](https://github.com/QingWei-Li/docsify/commit/036fdac))
- add edit button demo ([a64cee1](https://github.com/QingWei-Li/docsify/commit/a64cee1))
- add edit button demo, close [#162](https://github.com/QingWei-Li/docsify/issues/162) ([036fdac](https://github.com/QingWei-Li/docsify/commit/036fdac))
<a name="4.1.7"></a>
@ -454,7 +665,7 @@
### Bug Fixes
* **ssr:** clean files ([0014895](https://github.com/QingWei-Li/docsify/commit/0014895))
- **ssr:** clean files ([0014895](https://github.com/QingWei-Li/docsify/commit/0014895))
<a name="4.1.6"></a>
@ -462,7 +673,7 @@
### Bug Fixes
* **ssr:** add debug ([6b9e092](https://github.com/QingWei-Li/docsify/commit/6b9e092))
- **ssr:** add debug ([6b9e092](https://github.com/QingWei-Li/docsify/commit/6b9e092))
<a name="4.1.5"></a>
@ -470,7 +681,7 @@
### Bug Fixes
* **ssr:** missing package ([6db8c9e](https://github.com/QingWei-Li/docsify/commit/6db8c9e))
- **ssr:** missing package ([6db8c9e](https://github.com/QingWei-Li/docsify/commit/6db8c9e))
<a name="4.1.4"></a>
@ -478,7 +689,7 @@
### Bug Fixes
* **ssr:** file path ([79a83bc](https://github.com/QingWei-Li/docsify/commit/79a83bc))
- **ssr:** file path ([79a83bc](https://github.com/QingWei-Li/docsify/commit/79a83bc))
<a name="4.1.3"></a>
@ -486,7 +697,7 @@
### Bug Fixes
* update babel config ([9825db4](https://github.com/QingWei-Li/docsify/commit/9825db4))
- update babel config ([9825db4](https://github.com/QingWei-Li/docsify/commit/9825db4))
<a name="4.1.2"></a>
@ -494,7 +705,7 @@
### Bug Fixes
* update babel config ([80dba19](https://github.com/QingWei-Li/docsify/commit/80dba19))
- update babel config ([80dba19](https://github.com/QingWei-Li/docsify/commit/80dba19))
<a name="4.1.1"></a>
@ -502,8 +713,8 @@
### Bug Fixes
* build for ssr package ([4cb20a5](https://github.com/QingWei-Li/docsify/commit/4cb20a5))
* remove history mode ([0e74e6c](https://github.com/QingWei-Li/docsify/commit/0e74e6c))
- build for ssr package ([4cb20a5](https://github.com/QingWei-Li/docsify/commit/4cb20a5))
- remove history mode ([0e74e6c](https://github.com/QingWei-Li/docsify/commit/0e74e6c))
<a name="4.1.0"></a>
@ -515,7 +726,7 @@
### Bug Fixes
* basePath for history mode ([fc1cd3f](https://github.com/QingWei-Li/docsify/commit/fc1cd3f))
- basePath for history mode ([fc1cd3f](https://github.com/QingWei-Li/docsify/commit/fc1cd3f))
<a name="4.0.1"></a>
@ -523,8 +734,8 @@
### Bug Fixes
* **ssr:** remove context ([4626157](https://github.com/QingWei-Li/docsify/commit/4626157))
* lint ([b764b6e](https://github.com/QingWei-Li/docsify/commit/b764b6e))
- **ssr:** remove context ([4626157](https://github.com/QingWei-Li/docsify/commit/4626157))
- lint ([b764b6e](https://github.com/QingWei-Li/docsify/commit/b764b6e))
<a name="4.0.0"></a>
@ -532,11 +743,11 @@
### Bug Fixes
* **render:** init event in ssr ([eba1c98](https://github.com/QingWei-Li/docsify/commit/eba1c98))
* lint ([1f4514d](https://github.com/QingWei-Li/docsify/commit/1f4514d))
- **render:** init event in ssr ([eba1c98](https://github.com/QingWei-Li/docsify/commit/eba1c98))
- lint ([1f4514d](https://github.com/QingWei-Li/docsify/commit/1f4514d))
### Features
* finish ssr ([3444884](https://github.com/QingWei-Li/docsify/commit/3444884))
* init ocsify-server-renderer ([6dea685](https://github.com/QingWei-Li/docsify/commit/6dea685))
* support history mode ([f095eb8](https://github.com/QingWei-Li/docsify/commit/f095eb8))
- finish ssr ([3444884](https://github.com/QingWei-Li/docsify/commit/3444884))
- init ocsify-server-renderer ([6dea685](https://github.com/QingWei-Li/docsify/commit/6dea685))
- support history mode ([f095eb8](https://github.com/QingWei-Li/docsify/commit/f095eb8))

View file

@ -11,46 +11,51 @@
<p align="center">
<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/QingWei-Li/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/QingWei-Li/docsify/master.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/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">Glod Sponsor via <a href="https://opencollective.com/docsify">Open Collective</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/tiers/gold-sponsor/website">
<a href="https://opencollective.com/docsify/order/3254">
<img src="https://opencollective.com/docsify/tiers/gold-sponsor.svg?avatarHeight=36">
</a>
</p>
## Links
* [Documentation](https://docsify.js.org)
* [CLI](https://github.com/QingWei-Li/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/QingWei-Li/awesome-docsify)
- [`develop` branch preview](https://docsifyjs.netlify.com/)
- [Documentation](https://docsify.js.org)
- [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
* No statically built html files
* Simple and lightweight (~19kB gzipped)
* Smart full-text search plugin
* Multiple themes
* Useful plugin API
* Compatible with IE10+
* Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
* Support embedded files
- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
- Compatible with IE11
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
- Support embedded files
## Quick start
Look at [this tutorial](https://docsify.js.org/#/quickstart) or [online demo](https://jsfiddle.net/7ztb8qsr/1/).
Look at [this tutorial](https://docsify.js.org/#/quickstart)
[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)
## Showcase
These projects are using docsify to generate their sites. Pull requests welcome :blush:
Move to [awesome-docsify](https://github.com/QingWei-Li/awesome-docsify)
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
## Similar projects
@ -61,17 +66,16 @@ Move to [awesome-docsify](https://github.com/QingWei-Li/awesome-docsify)
## Contributing
* Fork it!
* 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
- Fork it!
- 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
## Development
```bash
npm run bootstrap && npm run dev
open http://localhost:3000
```
## Backers
@ -98,10 +102,10 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
<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%2FQingWei-Li%2Fdocsify.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FQingWei-Li%2Fdocsify?ref=badge_large)
[![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)

53
app.js
View file

@ -1,53 +0,0 @@
var serveStatic = require('serve-static')
var http = require('http')
var fs = require('fs')
var Renderer = require('./packages/docsify-server-renderer/build.js')
var 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: 'qingwei-li/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/QingWei-Li/docsify/master/CHANGELOG'
}
},
path: './'
})
http
.createServer(function (req, res) {
serveStatic('.')(req, res, function () {
// TEST SSR
// renderer.renderToString(req.url)
// .then(html => res.end(html))
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,50 +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,19 +1,19 @@
var rollup = require('rollup')
var buble = require('rollup-plugin-buble')
var commonjs = require('rollup-plugin-commonjs')
var nodeResolve = require('rollup-plugin-node-resolve')
var string = require('rollup-plugin-string')
var uglify = require('rollup-plugin-uglify')
var replace = require('rollup-plugin-replace')
var isProd = process.argv[process.argv.length - 1] !== '--dev'
var version = process.env.VERSION || require('../package.json').version
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({
input: 'src/' + opts.entry,
input: opts.input,
plugins: (opts.plugins || []).concat([
string({ include: '**/*.css' }),
buble(),
commonjs(),
nodeResolve(),
@ -24,7 +24,7 @@ var build = function (opts) {
])
})
.then(function (bundle) {
var dest = 'lib/' + (opts.output || opts.entry)
var dest = 'lib/' + (opts.output || opts.input)
console.log(dest)
bundle.write({
@ -37,41 +37,83 @@ var build = function (opts) {
console.error(err)
})
}
build({
entry: 'core/index.js',
output: 'docsify.js'
})
var plugins = [
{ name: 'search', entry: 'search/index.js' },
{ name: 'ga', entry: 'ga.js' },
{ name: 'emoji', entry: 'emoji.js' },
{ name: 'external-script', entry: 'external-script.js' },
{ name: 'front-matter', entry: 'front-matter/index.js' },
{ name: 'zoom-image', entry: 'zoom-image.js' },
{ name: 'disqus', entry: 'disqus.js' },
{ name: 'gitalk', entry: 'gitalk.js' }
]
plugins.forEach(item => {
const buildCore = function () {
build({
entry: 'plugins/' + item.entry,
output: 'plugins/' + item.name + '.js'
input: 'src/core/index.js',
output: 'docsify.js'
})
})
if (isProd) {
build({
entry: 'core/index.js',
output: 'docsify.min.js',
plugins: [uglify()]
})
plugins.forEach(item => {
if (isProd) {
build({
entry: 'plugins/' + item.entry,
output: 'plugins/' + item.name + '.min.js',
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()
}

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

1
build/release.sh Normal file → Executable file
View file

@ -29,7 +29,6 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
# commit
git add -A
git add -f lib/ -A
git commit -m "[build] $VERSION $RELEASE_TAG"
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"

View file

@ -1,53 +0,0 @@
<!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: {
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_navbar.md': '/_navbar.md'
},
auto2top: true,
basePath: '/docs/',
executeScript: true,
loadNavbar: true,
loadSidebar: true,
coverpage: true,
name: 'docsify',
subMaxLevel: 2,
mergeNavbar: true,
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/' + vm.route.file
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
</script>
<script src="/lib/docsify.js"></script>
</body>
</html>

View file

@ -2,28 +2,31 @@
> A magical documentation site generator.
## What is it
## 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 website. All you need to do is create an `index.html` to start and [deploy it on GitHub Pages](deploy.md).
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) for more details.
See the [Quick start](quickstart.md) guide for more details.
## Features
* No statically built html files
* Simple and lightweight (~19kB gzipped)
* Smart full-text search plugin
* Multiple themes
* Useful plugin API
* Emoji support
* Compatible with IE10+
- Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
- Emoji support
- Compatible with IE11
- Support server-side rendering ([example](https://github.com/docsifyjs/docsify-ssr-demo))
## Examples
Check out the [Showcase](https://github.com/QingWei-Li/docsify/#showcase) to docsify in use.
Check out the [Showcase](https://github.com/docsifyjs/awesome-docsify#showcase) to see docsify in use.
## Donate
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:
## Community
Users and the development team are usually in the [Gitter chat room](https://gitter.im/docsifyjs/Lobby).

View file

@ -1,12 +1,12 @@
![logo](_media/icon.svg)
# docsify <small>4.6.3</small>
# docsify <small>4.9.4</small>
> A magical documentation site generator.
* Simple and lightweight (~19kB gzipped)
* No statically built html files
* Multiple themes
- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#docsify)
[GitHub](https://github.com/docsifyjs/docsify/)
[Getting Started](#docsify)

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)

View file

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

View file

@ -1,28 +1,28 @@
* Getting started
- Getting started
* [Quick start](quickstart.md)
* [Writing more pages](more-pages.md)
* [Custom navbar](custom-navbar.md)
* [Cover page](cover.md)
- [Quick start](quickstart.md)
- [Writing more pages](more-pages.md)
- [Custom navbar](custom-navbar.md)
- [Cover page](cover.md)
* Customization
- Customization
* [Configuration](configuration.md)
* [Themes](themes.md)
* [List of Plugins](plugins.md)
* [Write a Plugin](write-a-plugin.md)
* [Markdown configuration](markdown.md)
* [Language highlighting](language-highlight.md)
- [Configuration](configuration.md)
- [Themes](themes.md)
- [List of Plugins](plugins.md)
- [Write a Plugin](write-a-plugin.md)
- [Markdown configuration](markdown.md)
- [Language highlighting](language-highlight.md)
* Guide
- Guide
* [Deploy](deploy.md)
* [Helpers](helpers.md)
* [Vue compatibility](vue.md)
* [CDN](cdn.md)
* [Offline Mode(PWA)](pwa.md)
* [Server-client renderer(SSR)](ssr.md)
* [Embed Files <sup style="color:red">(new)<sup>](embed-files.md)
- [Deploy](deploy.md)
- [Helpers](helpers.md)
- [Vue compatibility](vue.md)
- [CDN](cdn.md)
- [Offline Mode(PWA)](pwa.md)
- [Server-Side Rendering(SSR)](ssr.md)
- [Embed Files](embed-files.md)
* [Awesome docsify](awesome.md)
* [Changelog](changelog.md)
- [Awesome docsify](awesome.md)
- [Changelog](changelog.md)

View file

@ -12,7 +12,7 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
Alternatively, use [compressed files](#compressed-files).
Alternatively, use [compressed files](#compressed-file).
## Specific version

View file

@ -5,7 +5,7 @@ You can configure the `window.$docsify`.
```html
<script>
window.$docsify = {
repo: 'QingWei-Li/docsify',
repo: 'docsifyjs/docsify',
maxLevel: 3,
coverpage: true
}
@ -14,8 +14,8 @@ You can configure the `window.$docsify`.
## el
* Type: `String`
* Default: `#app`
- Type: `String`
- Default: `#app`
The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
@ -27,23 +27,23 @@ window.$docsify = {
## repo
* Type: `String`
* Default: `null`
- 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: 'QingWei-Li/docsify',
repo: 'docsifyjs/docsify',
// or
repo: 'https://github.com/QingWei-Li/docsify/'
repo: 'https://github.com/docsifyjs/docsify/'
};
```
## maxLevel
* Type: `Number`
* Default: `6`
- Type: `Number`
- Default: `6`
Maximum Table of content level.
@ -55,8 +55,8 @@ window.$docsify = {
## loadNavbar
* Type: `Boolean|String`
* Default: `false`
- Type: `Boolean|String`
- Default: `false`
Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
@ -72,8 +72,8 @@ window.$docsify = {
## loadSidebar
* Type: `Boolean|String`
* Default: `false`
- Type: `Boolean|String`
- Default: `false`
Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
@ -89,8 +89,8 @@ window.$docsify = {
## subMaxLevel
* Type: `Number`
* Default: `0`
- Type: `Number`
- Default: `0`
Add table of contents (TOC) in custom sidebar.
@ -102,8 +102,8 @@ window.$docsify = {
## auto2top
* Type: `Boolean`
* Default: `false`
- Type: `Boolean`
- Default: `false`
Scrolls to the top of the screen when the route is changed.
@ -115,8 +115,8 @@ window.$docsify = {
## homepage
* Type: `String`
* Default: `README.md`
- 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.
@ -127,13 +127,13 @@ window.$docsify = {
// Or use the readme in your repo
homepage:
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
'https://raw.githubusercontent.com/docsifyjs/docsify/master/README.md'
};
```
## basePath
* Type: `String`
- Type: `String`
Base path of the website. You can set it to another directory or another domain name.
@ -150,10 +150,50 @@ window.$docsify = {
};
```
## 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`
- Type: `Boolean|String|String[]|Object`
- Default: `false`
Activate the [cover feature](cover.md). If true, it will load from `_coverpage.md`.
@ -175,9 +215,21 @@ window.$docsify = {
};
```
## 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`
- Type: `String`
Website name as it appears in the sidebar.
@ -189,8 +241,8 @@ window.$docsify = {
## nameLink
* Type: `String`
* Default: `window.location.pathname`
- Type: `String`
- Default: `window.location.pathname`
The name of the link.
@ -208,7 +260,7 @@ window.$docsify = {
## markdown
* Type: `Function`
- Type: `Function`
See [Markdown configuration](markdown.md).
@ -234,7 +286,7 @@ window.$docsify = {
## themeColor
* Type: `String`
- 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.
@ -246,7 +298,7 @@ window.$docsify = {
## alias
* Type: `Object`
- Type: `Object`
Set the route alias. You can freely manage routing rules. Supports RegExp.
@ -256,7 +308,7 @@ window.$docsify = {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
'/.*/_sidebar.md': '/_sidebar.md' // See #301
}
};
@ -264,9 +316,9 @@ window.$docsify = {
## autoHeader
* type: `Boolean`
- 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/QingWei-Li/docsify/issues/78).
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 = {
@ -277,7 +329,7 @@ window.$docsify = {
## executeScript
* type: `Boolean`
- 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.
@ -299,7 +351,7 @@ Note that if you are running an external script, e.g. an embedded jsfiddle demo,
## noEmoji
* type: `Boolean`
- type: `Boolean`
Disabled emoji parse.
@ -311,7 +363,7 @@ window.$docsify = {
## mergeNavbar
* type: `Boolean`
- type: `Boolean`
Navbar will be merged with the sidebar on smaller screens.
@ -323,7 +375,7 @@ window.$docsify = {
## formatUpdated
* type: `String|Function`
- 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
@ -342,8 +394,8 @@ window.$docsify = {
## externalLinkTarget
* type: `String`
* default: `_blank`
- type: `String`
- default: `_blank`
Target to open external links. Default `'_blank'` (new window/tab)
@ -355,8 +407,8 @@ window.$docsify = {
## routerMode
* type: `String`
* default: `history`
- type: `String`
- default: `hash`
```js
window.$docsify = {
@ -366,9 +418,9 @@ window.$docsify = {
## noCompileLinks
* type: `Array`
- type: `Array`
Sometimes we do not want docsify to handle our links. See [#203](https://github.com/QingWei-Li/docsify/issues/203)
Sometimes we do not want docsify to handle our links. See [#203](https://github.com/docsifyjs/docsify/issues/203)
```js
window.$docsify = {
@ -378,9 +430,9 @@ window.$docsify = {
## onlyCover
* type: `Boolean`
- type: `Boolean`
Only coverpage is loaded when When visiting the home page.
Only coverpage is loaded when visiting the home page.
```js
window.$docsify = {
@ -390,7 +442,7 @@ window.$docsify = {
## requestHeaders
* type: `Object`
- type: `Object`
Set the request resource headers.
@ -404,7 +456,7 @@ window.$docsify = {
## ext
* type: `String`
- type: `String`
Request file extension.
@ -413,3 +465,54 @@ 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.

View file

@ -26,11 +26,11 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
> A magical documentation site generator.
* Simple and lightweight (~19kB gzipped)
* No statically built html files
* Multiple themes
- Simple and lightweight (~21kB gzipped)
- No statically built html files
- Multiple themes
[GitHub](https://github.com/QingWei-Li/docsify/)
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsify)
```
@ -45,7 +45,7 @@ The background color is generated randomly by default. You can customize the bac
# docsify <small>3.5</small>
[GitHub](https://github.com/QingWei-Li/docsify/)
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#quick-start)
<!-- background image -->
@ -59,7 +59,7 @@ The background color is generated randomly by default. You can customize the bac
## Coverpage as homepage
Normal, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
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

View file

@ -1,29 +0,0 @@
## docsify
> Ein magischer Generator für Dokumentationen.
## Was ist das
**docsify** generiert deine Dokumentationswebseite zeitgleich (mit der Darstellung). Im Gegensatz zu GitBook, werden keine statischen HTML Seiten generiert. Stattdessen, werden im Hintergrund Markdown Dateien geladen und umgewandelt, und als Webseite dargestellt. Alles, was du brauchst, ist eine Datei namens `index.html`, um sie über [GitHub Pages zu veröffentlichen](de-de/deploy.md).
Siehe [Schnellstart](de-de/quickstart.md) für weitere Informationen.
## Features
* keine generierten, statischen HTML Dateien
* einfach und klein (~19kB gzipped)
* smarte Erweiterung mit Volltextsuche
* mehrere Themes
* praktische API für Erweiterungen
* Unterstützung für Emoji
* Kompatibel mit IE10+
- Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
## Beispiele
Vergleiche die Liste namens [Showcase](https://github.com/QingWei-Li/docsify/#showcase) mit Beispielen, wie **docsify** verwendet wird.
## Spenden
Bitte ziehe eine Spende in Erwägung, sollte **docsify** dir hilfreich oder meine Arbeit dir wertvoll erscheinen. Ich freue mich, wenn du mir [eine Tasse Kaffee kaufst](https://github.com/QingWei-Li/donate). :heart:

View file

@ -1,28 +0,0 @@
* Loslegen
* [Schnellstart](de-de/quickstart.md)
* [Schreiben weiterer Seiten](de-de/more-pages.md)
* [Navigationsleiste anpassen](de-de/custom-navbar.md)
* [Titelseite](de-de/cover.md)
* Anpassen
* [Einstellungen](de-de/configuration.md)
* [Themen](de-de/themes.md)
* [Liste der Erweiterungen](de-de/plugins.md)
* [Schreiben eigener Erweiterungen](de-de/write-a-plugin.md)
* [Markdown-Einstellungen](de-de/markdown.md)
* [Hervorheben von Sprachen](de-de/language-highlight.md)
* Guide
* [Inbetriebnahme](de-de/deploy.md)
* [Helfer](de-de/helpers.md)
* [Vue Kompatibilität](de-de/vue.md)
* [CDN](de-de/cdn.md)
* [Offline Modus (PWA)](de-de/pwa.md)
* [Server-client renderer (SSR)](de-de/ssr.md)
* [Embed Files <sup style="color:red">(new)<sup>](de-de/embed-files.md)
* [Awesome docsify](de-de/awesome.md)
* [Changelog](de-de/changelog.md)

View file

@ -1,49 +0,0 @@
# CDN
Empfohlen: [unpkg](//unpkg.com), welches jeweils die aktuelle Version liefert, wie sie über npm veröffentlicht wurde. Du kannst auch den Quellcode des npm Packets über [unpkg.com/docsify/](//unpkg.com/docsify/) anschauen.
## Aktuelle Version
```html
<!-- lade CSS -->
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<!-- lade Script -->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
Alternativ kannst du auch die [komprimierten Dateien](#komprimierte-dateien) verwenden.
## Spezielle Version
```html
<!-- lade CSS -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/themes/vue.css">
<!-- lade Script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.js"></script>
```
## Komprimierte Dateien
```html
<!-- lade CSS -->
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<!-- lade Script -->
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```html
<!-- lade CSS -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/lib/themes/vue.css">
<!-- lade Script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.min.js"></script>
```
## Andere CDN
- http://www.bootcdn.cn/docsify
- https://cdn.jsdelivr.net/npm/docsify/
- https://cdnjs.com/libraries/docsify

View file

@ -1,403 +0,0 @@
# Einstellungen
You can configure the `window.$docsify`.
```html
<script>
window.$docsify = {
repo: 'QingWei-Li/docsify',
maxLevel: 3,
coverpage: true
}
</script>
```
## el
* Typ: `String`
* Standard: `#app`
Das DOM Element kann bei der Initialisierung gesetzt werden. Es kann ein CSS selector string oder ein richtiges HTMLElement sein.
```js
window.$docsify = {
el: '#app'
};
```
## repo
* Typ: `String`
* Standard: `null`
Verwende die repository URL oder eine Zeichenfolge aus `Benutzername/repo`, um das [GitHub Corner](http://tholman.com/github-corners/) widget in die obere rechte Ecke der Seite zu implementieren.
```js
window.$docsify = {
repo: 'QingWei-Li/docsify',
// oder
repo: 'https://github.com/QingWei-Li/docsify/'
};
```
## maxLevel
* Typ: `Number`
* Standard: `6`
Maximale Anzahl der Inhaltsübersichtebenen.
```js
window.$docsify = {
maxLevel: 4
};
```
## loadNavbar
* Typ: `Boolean|String`
* Standard: `false`
Lädt die Navigationsleiste von der Markdown Datei `_navbar.md` falls **true**, oder vom gewählten Pfad.
```js
window.$docsify = {
// lade von _navbar.md
loadNavbar: true,
// lade von nav.md
loadNavbar: 'nav.md'
};
```
## loadSidebar
* Typ: `Boolean|String`
* Standard: `false`
Lädt das seitliche Inhaltsverzeichnis von der Markdown Datei `_sidebar.md` falls **true**, oder vom gewählten Pfad.
```js
window.$docsify = {
// lade von _sidebar.md
loadSidebar: true,
// lade von summary.md
loadSidebar: 'summary.md'
};
```
## subMaxLevel
* Typ: `Number`
* Standard: `0`
Wähle die maximale Anzahl der Unterpunkte pro Datei in der Inhaltsübersicht.
```js
window.$docsify = {
subMaxLevel: 2
};
```
## auto2top
* Typ: `Boolean`
* Standard: `false`
Scrolle zum Anfang der Seite, wenn die Route gewechselt wird.
```js
window.$docsify = {
auto2top: true
};
```
## homepage
* Typ: `String`
* Standard: `README.md`
`README.md` in deinem Ordner für die Dokumentation wird als Startseite für deine Webseite gesetzt, aber manchmal musst du das vielleicht ändern.
```js
window.$docsify = {
// Wähle /home.md
homepage: 'home.md',
// Oder verwende das README in deinem repo
homepage:
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
};
```
## basePath
* Typ: `String`
Der Basispfad der Webseite. Du kannst einen anderen Ordner wählen, oder eine andere Domain.
```js
window.$docsify = {
basePath: '/path/',
// Lade die Dateien von einer anderen Domain
basePath: 'https://docsify.js.org/',
// Oder lade Dateien von einem anderen repo
basePath:
'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
};
```
## coverpage
* Typ: `Boolean|String`
* Standard: `false`
Aktiviere das [Titelseitenfeature](de-de/cover.md). Falls `true`, wird sie von `_coverpage.md` geladen.
```js
window.$docsify = {
coverpage: true,
// Anderer Dateiname
coverpage: 'cover.md',
// mutiple covers
coverpage: ['/', '/zh-cn/'],
// mutiple covers and custom file name
coverpage: {
'/': 'cover.md',
'/zh-cn/': 'cover.md'
}
};
```
## name
* Typ: `String`
Webseitenname, wie er in der Inhaltsübersicht in der Seitenleiste angezeigt wird.
```js
window.$docsify = {
name: 'docsify'
};
```
## nameLink
* Typ: `String`
* Standard: `window.location.pathname`
Der Name der Links.
```js
window.$docsify = {
nameLink: '/',
// Für jede Route
nameLink: {
'/zh-cn/': '/zh-cn/',
'/': '/'
}
};
```
## markdown
* Typ: `Function`
Siehe [Markdown Konfiguration](de-de/markdown.md).
```js
window.$docsify = {
// Objekt
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
},
// Funktion
markdown: function(marked, renderer) {
// ...
return marked;
}
};
```
## themeColor
* Typ: `String`
Passe die Farbe der Themen an. Verwende [CSS3 Variablen](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) und polyfill in älteren Browsern.
```js
window.$docsify = {
themeColor: '#3F51B5'
};
```
## alias
* Typ: `Object`
Verwende alternative Routen. Du kannst sie ungehindert anpassen. Supports RegExp.
```js
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_sidebar.md': '/_sidebar.md' // See #301
}
};
```
## autoHeader
* Typ: `Boolean`
Sollten `loadSidebar` und `autoHeader` beide aktiviert sein, setze einen Header vor die Seite in jedem Link in `_sidebar.md`, bevor sie in HTML umgewandelt wird. Vergleiche [#78](https://github.com/QingWei-Li/docsify/issues/78).
```js
window.$docsify = {
loadSidebar: true,
autoHeader: true
};
```
## executeScript
* Typ: `Boolean`
Führe das Skript auf der Seite aus. Analysiere nur das erste script tag ([demo](de-de/themes.md)). Sollte Vue verwendet sein, wird es in der Standardeinstellung ausgeführt.
```js
window.$docsify = {
executeScript: true
};
```
```markdown
## Dies ist ein Test
<script>
console.log(2333)
</script>
```
?> Nehme zur Kenntnis, dass, solltest du ein externes Skript ausführen, z.B. ein eingebettete jsfiddle demo, du sicher gehen solltest, das [external-script](de-de/plugins.md?id=external-script) plugin zu verwenden.
## noEmoji
* type: `Boolean`
Verhindere die Umwandlung in Emojis:
```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`
Currently it defaults to \_blank, would be nice if configurable:
```js
window.$docsify = {
externalLinkTarget: '_self' // default: '_blank'
};
```
## routerMode
* type: `String`
* default: `history`
```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/QingWei-Li/docsify/issues/203)
```js
window.$docsify = {
noCompileLinks: ['/foo', '/bar/.*']
};
```
## 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'
};
```

View file

@ -1,99 +0,0 @@
# Titelseite
Aktiviere die Unterstützung für Titelseiten, indem du `coverpage` auf **true** einstellst, vergleiche [coverpage Einstellungen](configuration.md#coverpage).
## Einfache Verwendung
Setze `coverpage` auf **true**, und erstelle `_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>
> Ein magischer Generator für Dokumentationsseiten.
* Einfach und wenig Speicherbedarf (~19kB gzipped)
* Keine statischen HTML Dateien
* Mehrere Themes
[GitHub](https://github.com/QingWei-Li/docsify/)
[Schnellstart](#docsify)
```
!> Die Dokumentationsseiten können nur eine Titelseite haben!
## Eigener Hintergrund
Die Hintergrundfarbe wird in der Standardeinstellung zufällig generiert. Du kannst sie anpassen, oder auch ein Hintergrundbild verwenden:
```markdown
<!-- _coverpage.md -->
# docsify <small>3.5</small>
[GitHub](https://github.com/QingWei-Li/docsify/)
[Schnellstart](#quick-start)
<!-- Hintegrundbild -->
![](_media/bg.png)
<!-- Hintegrundfarbe -->
![color](#f0f0f0)
```
## Coverpage as homepage
Normal, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](de-de/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'
}
};
```

View file

@ -1,96 +0,0 @@
# Navigationsleiste anpassen
## HTML
Solltest du eine Navigationsleiste benötigen, so kannst du eine HTML-basierte erstellen.
!> Die Links der Dokumentation fangen alle mit `#/` an.
```html
<!-- index.html -->
<body>
<nav>
<a href="#/">EN</a>
<a href="#/de-de/">DE</a>
</nav>
<div id="app"></div>
</body>
```
## Markdown
Oder du kannst deine Navigationsleiste mit einer Datei basierend auf Markdown erstellen, indem du `loadNavbar` auf **true** setzt und eine Datei namens `_navbar.md` erstellst, vergleiche [loadNavbar Einstellungen](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](/)
* [Deutsch](/de-de/)
```
!> Solltest du Github Pages verwenden, musst du zusätzlich eine Datei namens `.nojekyll` in `./docs` erstellen, um zu verhindern, dass Github Dateien ignoriert, die mit einem Unterstrich anfangen.
`_navbar.md` wird in jedem Verzeichnislevel geladen. Sollte das aktuelle Verzeichnis keine Datei namens `_navbar.md` haben, so sucht **docsify** in den übergeordneten Ordnern. Wenn du z.B. im Moment im Verzeichnis `/guide/quick-start` bist, so wird `_navbar.md` von der Datei `/guide/_navbar.md` geladen.
## Aufbauen von Strukturen
Du kannst untergeordnete Listen erstellen, indem du untergeordnete Punkte einem übergeordneten Punkt gegenüber einrückst.
```markdown
<!-- _navbar.md -->
* Getting started
* [Quick start](de-de/quickstart.md)
* [Writing more pages](de-de/more-pages.md)
* [Custom navbar](de-de/custom-navbar.md)
* [Cover page](de-de/cover.md)
* Configuration
* [Configuration](de-de/configuration.md)
* [Themes](de-de/themes.md)
* [Using plugins](de-de/plugins.md)
* [Markdown configuration](de-de/markdown.md)
* [Language highlight](de-de/language-highlight.md)
```
wird also wie folgt aussehen
![Nesting navbar](_images/nested-navbar.png 'Nesting navbar')
## Angepasste Navigationsleisten in Verbindung mit dem emoji Erweiterung
Solltest du die [emoji Erweiterung](plugins.md#emoji) verwenden:
```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>
```
so kannst du z.B. auch die Flaggenemojis in der Markdown Datei für deine angepasste Navigationsleiste verwenden:
```markdown
<!-- _navbar.md -->
* [:us:, :uk:](/)
* [:de:](/de-de/)
```

View file

@ -1,57 +0,0 @@
# Inbetriebnahme
Ähnlich wie bei [GitBook](https://www.gitbook.com), kannst du deine Dateien über GitHub Pages oder VPS erstellen.
## GitHub Pages
Du kannst folgende drei Orte verwenden, um die Dokumentation für dein Github repository zu verwalten:
* `docs/` Ordner
* master branch
* gh-pages branch
Es wird empfohlen, deine Dateien im `./docs` Unterordner im `master` branch deines repository zu speichern. Wechsle dann zu den Einstellungen deines repository und wähle `master branch /docs folder` als deine Github Pages Quelle.
![github pages](_images/deploy-github-pages.png)
!> Du kannst die Dateien auch im Hauptverzeichnis speichern und dann `master branch` in den Einstellungen auswählen.
## 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.
## VPS
Verwende folgende nginx config.
```nginx
server {
listen 80;
server_name your.domain.com;
location / {
alias /path/to/dir/of/docs;
index index.html;
}
}
```

View file

@ -1,66 +0,0 @@
# 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')
## 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).

View file

@ -1,76 +0,0 @@
# Dokumentationshelfer
docsify erweitert die Markdownsyntax, um deine Dokumente besser lesbar zu machen.
## Wichtiger Inhalt
Wichtiger Inhalt wie:
```markdown
!> **Zeit** ist Geld, mein Freund!
```
wird wie folgt gerendert:
!> **Zeit** ist Geld, mein Freund!
## Generelle Tipps
Generelle Tipps wie:
```markdown
?> _TODO_ unit test
```
wird wie folgt gerendert:
?> _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')
```
## Github Task Lists
```md
* [ ] foo
* bar
* [x] baz
* [] bam <~ not working
* [ ] bim
* [ ] lim
```
* [ ] foo
* bar
* [x] baz
* [] bam <~ not working
* [ ] bim
* [ ] lim

View file

@ -1,11 +0,0 @@
# Hervorheben von Sprachen
**docsify** verwendet [Prism](https://github.com/PrismJS/prism) um Quellcodeabschnitte in deinen Seiten hervorzuheben. Als Standardeinstellung werden nur CSS, JavaScipt und HTML unterstützt. Du kannst **Prism** auch mit weiteren Sprachen verwenden:
```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>
```
?> Vergleiche die [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) Liste für weitere Optionen.

View file

@ -1,57 +0,0 @@
# Markdown Einstellungen
**docsify** verwendet [marked](https://github.com/chjj/marked), um Markdown umzuwandeln. Du kannst einstellen, wie es deine Markdown Seiten in HTML umwandelt, indem du `renderer` konfigurierst:
```js
window.$docsify = {
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
}
}
```
?> Für mögliche Einstellungen, siehe [marked Dokumentation](https://github.com/chjj/marked#options-1)
Du kannst die Regeln auch beliebig anpassen.
```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>
mermaid.initialize({ startOnLoad: false });
window.$docsify = {
markdown: {
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
);
}
return this.origin.code.apply(this, arguments);
}
}
}
}
```

View file

@ -1,107 +0,0 @@
# Noch mehr Seiten
Wenn du mehr Seiten für deine Dokumentation brauchst, so kannst du weitere Markdown Dateien in deinem **docsify** Ordner erstellen. Eine Datei namens `guide.md` ist dann über `/#/guide` erreichbar.
Nehmen wir als Beispiel folgende Verzeichnisstruktur:
```text
.
├── docs
| └── README.md
| └── guide.md
| └── de-de
| └──README.md
| └──guide.md
```
Die passenden Routen sind dann
```text
docs/README.md => http://domain.com
docs/guide.md => http://domain.com/guide
docs/de-de/README.md => http://domain.com/de-de/
docs/de-de/guide.md => http://domain.com/de-de/guide
```
## Seitenleiste mit Inhaltsverzeichnis anpassen
Als Standardeinstellung wird das Inhaltsverzeichnis in der Seitenleiste automatisch basierend auf vorhandenen Markdown Dateien generiert. Wenn du das seitliche Inhaltsverzeichnis anpassen willst, kannst du eine Datei namens `_sidebar.md` erstellen (vergleiche [das seitliche Inhaltsverzeichnis für diese Dokumentation](https://github.com/QingWei-Li/docsify/blob/master/docs/de-de/_sidebar.md) als Beispiel):
Als Erstes musst du `loadSidebar` auf **true** setzen, vergleiche [Einstellungen für das seitliche Inhaltsverzeichnis](configuration.md#loadsidebar).
```html
<!-- index.html -->
<script>
window.$docsify = {
loadSidebar: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Als Zweites erstellst du eine Datei namens `_sidebar.md`:
```markdown
<!-- docs/_sidebar.md -->
* [Home](/)
* [Guide](de-de/guide.md)
```
!> Solltest du Github Pages verwenden, musst du zusätzlich eine Datei namens `.nojekyll` in `./docs` erstellen, um zu verhindern, dass Github Dateien ignoriert, die mit einem Unterstrich anfangen.
`_sidebar.md` wird in jedem Verzeichnislevel geladen. Sollte das aktuelle Verzeichnis keine Datei namens `_sidebar.md` haben, so sucht **docsify** in den übergeordneten Ordnern. Wenn du z.B. im Moment im Verzeichnis `/guide/quick-start` bist, so wird `_sidebar.md` von der Datei `/guide/_sidebar.md` geladen.
You can specify `alias` to avoid unnecessary fallback.
```html
<script>
window.$docsify = {
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
}
}
</script>
```
## Inhaltsverzeichnis
Eine angepasste Seitenleist kann auch automatisch ein Inhaltsverzeichnis generieren, indem ein `subMaxLevel` gesetzt wird, vergleiche [subMaxLevel Einstellungen](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.

View file

@ -1,183 +0,0 @@
# Liste der Erweiterungen
## Volltextsuche
Als Standardeinstellung werden Hyperlinks auf der aktuellen Seite erkannt und der Inhalt in `localStorage` gespeichert. Du kannst den Pfad zu den Dateien auch anpassen:
```html
<script>
window.$docsify = {
search: 'auto', // Standard
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/de-de/', // => /de-de/README.md
],
// vollständige Parameter für die Einstellungen
search: {
maxAge: 86400000, // Verfallszeit, als Standard ein Tag
paths: [], // oder 'auto'
placeholder: 'Type to search',
// Lokalisation
placeholder: {
'/de-de/': 'Suche',
'/': 'Search'
},
noData: 'No Results!',
// Lokalisation
noData: {
'/de-de/': 'Keine Ergebnisse',
'/': 'No Results'
},
// Headline depth, 1 - 6
depth: 2
}
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
```
## Google Analytics
Installiere diese Erweiterung und passe die track id an:
```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>
```
Konfiguration über `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>
```
## front matter
```html
<script src="//unpkg.com/docsify/lib/plugins/front-matter.min.js"></script>
```
## emoji
Als Standardeinstellung werden emojis umgewandelt. Als Beispiel wird `:100:` umgewandelt in :100:. Aber das ist nicht genau, das es keine passende Nicht-emoji Zeichenfolge gibt. Solltest du emojis richtig umwandeln wollen, musst du diese Erweiterung verwenden.
```html
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
```
## Externes Skript
Wenn das Skript auf der Seite ein externes ist (eine Javascript Datei über das `src` Attribut importiert), brauchst du diese Erweiterung, damit das funktioniert.
```html
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
```
## Bilder zoomen
Medium's Bilderzoom. Basierend auf [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')
```
## 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.
## 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)
## 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
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
```
```javascript
window.$docsify = {
plugins: [
window.DocsifyCopyCodePlugin.init()
]
}
```
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>
```
## Navigation
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>
```

View file

@ -1,115 +0,0 @@
# Offline Modus
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) sind Erfahrungen die Vorzüge des Internets mit den Vorzügen von Apps verbinden. Wir können unsere Webseite verbessern, indem wir sie mit Hilfe von service workers auch **offline** und in schlechten Netzen interagierbar machen.
Sie sind sehr einfach zu verwenden.
## serviceWorker erstellen
Erstelle eine Datei namens `sw.js` in deinem **docsify** Verzeichnis und kopiere folgenden 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 */ })
)
}
})
```
## Registrieren
Jetzt registrieren wir die Funktion in der Datei `index.html`. Nur manche aktuellen Browser unterstützen die Funktion, wir müssen also prüfen:
*index.html*
```html
<script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script>
```
## Geniessen
Du kannst die Website jetzt veröffentlichen und Benutzer können sie dann vollständig offline verwenden, sobald sie einmal geladen wurde :ghost: Du kannst das jetzt ausprobieren, indem du deine Internetverbindung ausschaltest und diese Seite neu lädst.

View file

@ -1,94 +0,0 @@
# Schnellstart
Es wird empfohlen, `docsify-cli` global zu installieren, welches bei der Inbetriebnahme und der lokalen Vorschau hilft.
```bash
npm i docsify-cli -g
```
## Inbetriebnahme
Wenn du die Dokumentation in dem Unterordner `./docs` erstellen willst, kannst du den Befehl `init` verwenden.
```bash
docsify init ./docs
```
## Inhalt schreiben
Nachdem der Befehl `init` vollständig ausgeführt wurde, kannst du folgende Dateien im Unterordner `./docs` finden:
* `index.html` als zentrale Datei
* `README.md` als die Startseite für die Dokumentation
* `.nojekyll` verhindert, dass Github Pages Dateien ignoriert, die mit einem Unterstrich beginnen.
Du kannst die Dokumentation über die Datei `./docs/README.md` nach Belieben ändern, und natürlich [weitere Seiten](de-de/more-pages.md) hinzufügen.
## Vorschau der eigenen Seiten
Du kannst einen lokalen Server mit dem Befehl `docsify serve` laufen lassen, und auf eine Vorschau deiner Webseite über `http://localhost:3000` zugreifen.
```bash
docsify serve docs
```
?> Für weitere Informationen hinsichtlich der Verwendung von `docsify-cli`, siehe [docsify-cli Dokumentation](https://github.com/QingWei-Li/docsify-cli).
## Manuelle Inbetriebnahme
Wenn du `npm` nicht verwenden möchtest, oder Probleme bei der Installation des Tools hast, kannst du auch manuell die Datei namens `index.html` erstellen:
```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>
```
Solltest du Python installiert haben, kannst du einen statischen Server laufen lassen, um eine Vorschau deiner Webseite anzuschauen:
```bash
cd docs && python -m SimpleHTTPServer 3000
```
## Ladedialog
Wenn du möchtest, kann **docsify** einen Ladedialog anzeigen, während es deine Dokumentation umwandelt:
```html
<!-- index.html -->
<div id="app">Please wait...</div>
```
Du solltest das `data-app` Attribut anpassen, wenn du `el` geändert hast:
```html
<!-- index.html -->
<div data-app id="main">Please wait...</div>
<script>
window.$docsify = {
el: '#main'
}
</script>
```
Vergleiche [el Einstellungen](configuration.md#el).

View file

@ -1,123 +0,0 @@
# Server client renderer
See https://docsify.now.sh
Repo in https://github.com/QingWei-Li/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 templte 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-->
</body>
<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>
</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',
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: 'qingwei-li/docsify'
}
})
renderer.renderToString(url)
.then(html => {})
.catch(err => {})
```

View file

@ -1,56 +0,0 @@
# Themes
Es gibt im Moment vier Themes zur Auswahl, ähnlich wie die Webseiten von [Vue](//vuejs.org) oder [buble](//buble.surge.sh), sowie eine weitere, dunkle von [@liril-net](https://github.com/liril-net).
```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">
```
!> Komprimierte Dateien sind über `/lib/themes/` verfügbar.
```html
<!-- komprimierte Versionen -->
<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">
```
Solltest du weitere Themes erstellen, kannst du sie gerne der Allgemeinheit mit einem [pull request](https://github.com/QingWei-Li/docsify/pulls) zur Verfügung stellen.
#### Klicke hier für eine Vorschau
<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>

View file

@ -1,100 +0,0 @@
# Kompatibel mit Vue
Du kannst Vue Komponenten direkt in den Markdown Dateien verwenden, und sie werden umgewandelt. Du kannst dies zum Beispiel verwenden, um Vue Komponenten gleichzeitig zu demonstrieren und zu dokumentieren.
## Einfache Verwendung
Lade Vue in `./index.html`.
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
<!-- oder verwende die komprimierten Dateien -->
<script src="//unpkg.com/vue/dist/vue.min.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Dann kannst du sofort Vue Code in deinen Markdown Dateien verwenden. `new Vue({ el: '#main' })` wird als Standard ausgeführt, um Instanzen zu erschaffen.
*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>
```
Du kannst manuell eine Vue Instanz initialisieren.
*README.md*
```markdown
# Vue demo
<div>hello {{ msg }}</div>
<script>
new Vue({
el: '#main',
data: { msg: 'Vue' }
})
</script>
```
!> In Markdown Dateien wird nur das Skript innerhalb des ersten script tag Blocks ausgeführt.
## Kombiniere Vuep um Demos zu erschaffen
[Vuep](https://github.com/QingWei-Li/vuep) ist eine Komponente zur Darstellung von Vue Komponenten mit einem Liveeditor und einer Vorschau.Unterstützt die Vue Komponenten spec und JSX.
*index.html*
```html
<!-- injizieren von CSS -->
<link rel="stylesheet" href="//unpkg.com/vuep/dist/vuep.css">
<!-- injizieren von JS -->
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vuep"></script>
<script src="//unpkg.com/docsify"></script>
<!-- oder verwende die komprimierten Dateien -->
<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>
```
?> Zum Beispiel vergleich auch die [vuep Dokumentation](https://qingwei-li.github.io/vuep/).

View file

@ -1,94 +0,0 @@
# Schreiben einer Erweiterung
Eine Erweiterung ist schlicht eine Funktion, welche `hook` als Argument nimmt. hook unterstützt dabei das Verwalten von asynchrononen Tasks.
## Volle Konfiguration
```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.
})
}
]
}
```
!> Du kannst auf interne Methoden über `window.Docsify` zugreifen. Greife auf die aktuelle Instanz über das zweite Argument zu.
## Beispiel
### footer
Füge jeder Seite eine footer Komponente hinzu:
```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/QingWei-Li/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/QingWei-Li/docsify/blob/master/docs' + vm.route.file
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
```

View file

@ -6,16 +6,16 @@ Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pa
There're three places to populate your docs for your Github repository:
* `docs/` folder
* master branch
* gh-pages branch
- `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
You'll need to place a `.nojekyll` file in the deploy location (such as `/docs` or the gh-pages branch)
## GitLab Pages
@ -23,7 +23,7 @@ If you are deploying your master branch, include `.gitlab-ci.yml` with the follo
?> The `.public` workaround is so `cp` doesn't also copy `public/` to itself in an infinite loop.
``` YAML
```YAML
pages:
stage: deploy
script:
@ -46,15 +46,12 @@ pages:
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/**"
]
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
```
@ -71,8 +68,64 @@ server {
server_name your.domain.com;
location / {
alias /path/to/dir/of/docs;
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) |

View file

@ -39,6 +39,21 @@ You will get it
[filename](_media/example.md ':include :type=code')
## Embedded code fragments
Sometimes you don't want to embed a whole file. Maybe because you need just a few lines but you want to compile and test the file in CI.
```markdown
[filename](_media/example.js ':include :type=code :fragment=demo')
```
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
Alternatively you can use `### [demo]`.
Example:
[filename](_media/example.js ':include :type=code :fragment=demo')
## Tag attribute
If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags.

View file

@ -66,17 +66,80 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
## Github Task Lists
```md
* [ ] foo
* bar
* [x] baz
* [] bam <~ not working
* [ ] bim
* [ ] lim
- [ ] foo
- bar
- [x] baz
- [] bam <~ not working
- [ ] bim
- [ ] lim
```
* [ ] 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

@ -14,6 +14,7 @@
<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;
@ -26,9 +27,13 @@
<script>
window.$docsify = {
alias: {
'.*?/awesome': 'https://raw.githubusercontent.com/QingWei-Li/awesome-docsify/master/README.md',
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md'
'.*?/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,
@ -39,6 +44,10 @@
maxLevel: 4,
subMaxLevel: 2,
ga: 'UA-106147152-1',
matomo: {
host: '//matomo.thunderwave.de',
id: 6
},
name: 'docsify',
search: {
noData: {
@ -57,24 +66,39 @@
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/docs/' + vm.route.file
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----\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>
</html>

View file

@ -1,6 +1,6 @@
# Markdown configuration
**docsify** uses [marked](https://github.com/chjj/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`:
**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 = {
@ -15,7 +15,7 @@ window.$docsify = {
}
```
?> Configuration Options Reference [marked documentation](https://github.com/chjj/marked#options-1)
?> Configuration Options Reference [marked documentation](https://marked.js.org/#/USING_ADVANCED.md)
Even you can completely customize the parsing rules.
@ -36,6 +36,7 @@ window.$docsify = {
// <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css">
// <script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
var num = 0;
mermaid.initialize({ startOnLoad: false });
window.$docsify = {
@ -44,7 +45,7 @@ window.$docsify = {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + "</div>"
);
}
return this.origin.code.apply(this, arguments);

View file

@ -25,7 +25,7 @@ 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/QingWei-Li/docsify/blob/master/docs/_sidebar.md) for an example):
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).
@ -51,6 +51,10 @@ Create the `_sidebar.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.
@ -66,6 +70,18 @@ You can specify `alias` to avoid unnecessary fallback.
</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.

View file

@ -4,7 +4,6 @@
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 = {
@ -38,7 +37,13 @@ By default, the hyperlink on the current page is recognized and the content is s
},
// Headline depth, 1 - 6
depth: 2
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>
@ -67,12 +72,6 @@ Configure by `data-ga`.
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
```
## front matter
```html
<script src="//unpkg.com/docsify/lib/plugins/front-matter.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.
@ -100,10 +99,9 @@ Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour
Exclude the special image
```markdown
![](image.png ':no-zoom')
![](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)
@ -116,27 +114,16 @@ When readers expand the demo box, the source code and description are shown ther
[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
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
```
```javascript
window.$docsify = {
plugins: [
window.DocsifyCopyCodePlugin.init()
]
}
<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/
@ -172,7 +159,7 @@ Disqus comments. https://disqus.com/
</script>
```
## Navigation
## Pagination
Pagination for docsify. By [@imyelo](https://github.com/imyelo)
@ -181,3 +168,30 @@ Pagination for docsify. By [@imyelo](https://github.com/imyelo)
<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)

View file

@ -32,7 +32,7 @@ Run the local server with `docsify serve`. You can preview your site in your bro
docsify serve docs
```
?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/QingWei-Li/docsify-cli).
?> For more use cases of `docsify-cli`, head over to the [docsify-cli documentation](https://github.com/docsifyjs/docsify-cli).
## Manual initialization

View file

@ -1,8 +1,8 @@
# Server client renderer
# Server-Side Rendering
See https://docsify.now.sh
Repo in https://github.com/QingWei-Li/docsify-ssr-demo
Repo in https://github.com/docsifyjs/docsify-ssr-demo
## Why SSR?
- Better SEO
@ -111,10 +111,10 @@ var readFileSync = require('fs').readFileSync
// init
var renderer = new Renderer({
template: readFileSync('./docs/index.template.html', 'utf-8').,
template: readFileSync('./docs/index.template.html', 'utf-8'),
config: {
name: 'docsify',
repo: 'qingwei-li/docsify'
repo: 'docsifyjs/docsify'
}
})

View file

@ -20,7 +20,7 @@ There are currently three themes available. Copy [Vue](//vuejs.org) and [buble](
<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/QingWei-Li/docsify/pulls).
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
@ -54,3 +54,7 @@ If you have any ideas or would like to develop a new theme, you are welcome to s
});
};
</script>
## Other themes
- [docsify-themeable](https://jhildenbiddle.github.io/docsify-themeable/#/) A delightfully simple theme system for docsify.

View file

@ -10,7 +10,7 @@ Load the Vue in `./index.html`.
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
<!-- or use the compressed files -->
<!-- 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>
```
@ -42,7 +42,7 @@ You can manually initialize a Vue instance.
```markdown
# Vue demo
<div>hello {{ msg }}</div>
<div id="main">hello {{ msg }}</div>
<script>
new Vue({
@ -61,10 +61,10 @@ You can manually initialize a Vue instance.
*index.html*
```html
<!-- inject css file -->
<!-- Inject CSS file -->
<link rel="stylesheet" href="//unpkg.com/vuep/dist/vuep.css">
<!-- inject javascript file -->
<!-- Inject JavaScript file -->
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/vuep"></script>
<script src="//unpkg.com/docsify"></script>
@ -96,4 +96,4 @@ You can manually initialize a Vue instance.
</script>
```
?> Example Refer to the [vuep documentation](https://qingwei-li.github.io/vuep/).
?> Example Refer to the [Vuep documentation](https://qingwei-li.github.io/vuep/).

View file

@ -6,41 +6,41 @@ A plugin is simply a function that takes `hook` as an argument. The hook support
```js
window.$docsify = {
plugins: [
function (hook, vm) {
hook.init(function() {
// Called when the script starts running, only trigger once, no arguments,
})
plugins: [
function(hook, vm) {
hook.init(function() {
// Called when the script starts running, only trigger once, no arguments,
});
hook.beforeEach(function(content) {
// Invoked each time before parsing the Markdown file.
// ...
return content
})
hook.beforeEach(function(content) {
// Invoked each time before parsing the Markdown file.
// ...
return content;
});
hook.afterEach(function(html, next) {
// Invoked each time after the Markdown file is parsed.
// beforeEach and afterEach support asynchronous。
// ...
// call `next(html)` when task is done.
next(html)
})
hook.afterEach(function(html, next) {
// Invoked each time after the Markdown file is parsed.
// beforeEach and afterEach support asynchronous。
// ...
// call `next(html)` when task is done.
next(html);
});
hook.doneEach(function() {
// Invoked each time after the data is fully loaded, no arguments,
// ...
})
hook.doneEach(function() {
// Invoked each time after the data is fully loaded, no arguments,
// ...
});
hook.mounted(function() {
// Called after initial completion. Only trigger once, no arguments.
})
hook.mounted(function() {
// Called after initial completion. Only trigger once, no arguments.
});
hook.ready(function() {
// Called after initial completion, no arguments.
})
}
]
}
hook.ready(function() {
// Called after initial completion, no arguments.
});
}
]
};
```
!> You can get internal methods through `window.Docsify`. Get the current instance through the second argument.
@ -54,21 +54,21 @@ Add footer component in each pages.
```js
window.$docsify = {
plugins: [
function (hook) {
function(hook) {
var footer = [
'<hr/>',
'<footer>',
'<span><a href="https://github.com/QingWei-Li">cinwell</a> &copy;2017.</span>',
'<span>Proudly published with <a href="https://github.com/QingWei-Li/docsify" target="_blank">docsify</a>.</span>',
'<span>Proudly published with <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>',
'</footer>'
].join('')
].join('');
hook.afterEach(function (html) {
return html + footer
})
hook.afterEach(function(html) {
return html + footer;
});
}
]
}
};
```
### Edit Button
@ -77,17 +77,35 @@ window.$docsify = {
window.$docsify = {
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/docs' + vm.route.file
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
hook.beforeEach(function(html) {
var url =
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
vm.route.file;
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n';
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
return (
editHtml +
html +
'\n----\n' +
'Last modified {docsify-updated} ' +
editHtml
);
});
}
]
}
};
```
## Tips
### Get docsify version
```
console.log(window.Docsify.version)
```
Current version: <span id='tip-version'>loading</span>
<script>
document.getElementById('tip-version').innerText = Docsify.version
</script>

View file

@ -1,30 +0,0 @@
## docsify
> 一个神奇的文档网站生成工具
## 是什么
docsify 是一个动态生成文档网站的工具。不同于 GitBook、Hexo 的地方是它不会生成将 `.md` 转成 `.html` 文件,所有转换工作都是在运行时进行。
这将非常实用,如果只是需要快速的搭建一个小型的文档网站,或者不想因为生成的一堆 `.html` 文件“污染” commit 记录,只需要创建一个 `index.html` 就可以开始写文档而且直接[部署在 GitHub Pages](zh-cn/deploy.md)。
查看[快速开始](zh-cn/quickstart.md)了解详情。
## 特性
* 无需构建,写完文档直接发布
* 容易使用并且轻量 (~19kB gzipped)
* 智能的全文搜索
* 提供多套主题
* 丰富的 API
* 支持 Emoji
* 兼容 IE10+
* 支持 SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
## 例子
可以查看 [Showcase](https://github.com/QingWei-Li/docsify/#showcase) 来了解使用 docsify 的文档项目。
## 捐赠
如果你觉得 docsify 对你有帮助,或者想对我微小的工作一点资瓷,欢迎给我[捐赠](https://github.com/QingWei-Li/donate)。

View file

@ -1,28 +0,0 @@
* 入门
* [快速开始](zh-cn/quickstart.md)
* [多页文档](zh-cn/more-pages.md)
* [定制导航栏](zh-cn/custom-navbar.md)
* [封面](zh-cn/cover.md)
* 定制化
* [配置项](zh-cn/configuration.md)
* [主题](zh-cn/themes.md)
* [插件列表](zh-cn/plugins.md)
* [开发插件](zh-cn/write-a-plugin.md)
* [Markdown 配置](zh-cn/markdown.md)
* [代码高亮](zh-cn/language-highlight.md)
* 指南
* [部署](zh-cn/deploy.md)
* [文档助手](zh-cn/helpers.md)
* [兼容 Vue](zh-cn/vue.md)
* [CDN](zh-cn/cdn.md)
* [离线模式(PWA)](zh-cn/pwa.md)
* [服务端渲染 (SSR)](zh-cn/ssr.md)
* [文件嵌入<sup style="color:red">(new)<sup>](zh-cn/embed-files.md)
* [Awesome docsify](zh-cn/awesome.md)
* [Changelog](zh-cn/changelog.md)

View file

@ -1,49 +0,0 @@
# CDN
推荐使用 [unpkg](//unpkg.com) —— 能及时获取到最新版。
## 获取最新版本
根据 UNPKG 的规则,不指定特定版本号时将引入最新版。
```html
<!-- 引入 css -->
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<!-- 引入 script -->
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
## 获取指定版本
如果担心频繁地版本更新又可能引入未知 Bug我们也可以使用具体的版本。规则是 `//unpkg.com/docsify@VERSION/`
```html
<!-- 引入 css -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/themes/vue.css">
<!-- 引入 script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.js"></script>
```
!> 指定 *VERSION*`latest` 可以强制每次都请求最新版本。
## 压缩版
CSS 的压缩文件位于 `/lib/themes/` 目录下
```html
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
```
JS 的压缩文件是原有文件路径的基础上加 `.min`后缀
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
## 其他 CDN
- http://www.bootcdn.cn/docsify (支持国内)
- https://cdn.jsdelivr.net/npm/docsify/ (国内外都支持)
- https://cdnjs.com/libraries/docsify

View file

@ -1,415 +0,0 @@
# 配置项
你可以配置在 `window.$docsify` 里。
```html
<script>
window.$docsify = {
repo: 'QingWei-Li/docsify',
maxLevel: 3,
coverpage: true
}
</script>
```
## el
* 类型:`String`
* 默认值:`#app`
docsify 初始化的挂载元素,可以是一个 CSS 选择器,默认为 `#app` 如果不存在就直接绑定在 `body` 上。
```js
window.$docsify = {
el: '#app'
};
```
## repo
* 类型:`String`
* 默认值: `null`
配置仓库地址或者 `username/repo` 的字符串,会在页面右上角渲染一个 [GitHub Corner](http://tholman.com/github-corners/) 挂件。
```js
window.$docsify = {
repo: 'QingWei-Li/docsify',
// or
repo: 'https://github.com/QingWei-Li/docsify/'
};
```
## max-level
* 类型:`Number`
* 默认值: `6`
默认情况下会抓取文档中所有标题渲染成目录,可配置最大支持渲染的标题层级。
```js
window.$docsify = {
maxLevel: 4
};
```
## maxLevel
* Type: `Number`
* Default: `6`
Maximum Table of content level.
```js
window.$docsify = {
maxLevel: 4
};
```
## loadNavbar
* 类型:`Boolean|String`
* 默认值: `false`
加载自定义导航栏,参考[定制导航栏](zh-cn/custom-navbar.md) 了解用法。设置为 `true` 后会加载 `_navbar.md` 文件,也可以自定义加载的文件名。
```js
window.$docsify = {
// 加载 _navbar.md
loadNavbar: true,
// 加载 nav.md
loadNavbar: 'nav.md'
};
```
## loadSidebar
* 类型:`Boolean|String`
* 默认值: `false`
加载自定义侧边栏,参考[多页文档](zh-cn/more-pages.md)。设置为 `true` 后会加载 `_sidebar.md` 文件,也可以自定义加载的文件名。
```js
window.$docsify = {
// 加载 _sidebar.md
loadSidebar: true,
// 加载 summary.md
loadSidebar: 'summary.md'
};
```
## subMaxLevel
* 类型:`Number`
* 默认值: `0`
自定义侧边栏后默认不会再生成目录,你也可以通过设置生成目录的最大层级开启这个功能。
```js
window.$docsify = {
subMaxLevel: 2
};
```
## auto2top
* 类型:`Boolean`
* 默认值: `false`
切换页面后是否自动跳转到页面顶部。
```js
window.$docsify = {
auto2top: true
};
```
## homepage
* 类型:`String`
* 默认值: `README.md`
设置首页文件加载路径。适合不想将 `README.md` 作为入口文件渲染,或者是文档存放在其他位置的情况使用。
```js
window.$docsify = {
// 入口文件改为 /home.md
homepage: 'home.md',
// 文档和仓库根目录下的 README.md 内容一致
homepage:
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/README.md'
};
```
## basePath
* 类型:`String`
文档加载的根路径,可以是二级路径或者是其他域名的路径。
```js
window.$docsify = {
basePath: '/path/',
// 直接渲染其他域名的文档
basePath: 'https://docsify.js.org/',
// 甚至直接渲染其他仓库 readme
basePath:
'https://raw.githubusercontent.com/ryanmcdermott/clean-code-javascript/master/'
};
```
## coverpage
* 类型:`Boolean|String`
* 默认值: `false`
启用[封面页](zh-cn/cover.md)。开启后是加载 `_coverpage.md` 文件,也可以自定义文件名。
```js
window.$docsify = {
coverpage: true,
// 自定义文件名
coverpage: 'cover.md',
// mutiple covers
coverpage: ['/', '/zh-cn/'],
// mutiple covers and custom file name
coverpage: {
'/': 'cover.md',
'/zh-cn/': 'cover.md'
}
};
```
## name
* 类型:`String`
文档标题,会显示在侧边栏顶部。
```js
window.$docsify = {
name: 'docsify'
};
```
## nameLink
* 类型:`String`
* 默认值:`window.location.pathname`
点击文档标题后跳转的链接地址。
```js
window.$docsify = {
nameLink: '/',
// 按照路由切换
nameLink: {
'/zh-cn/': '/zh-cn/',
'/': '/'
}
};
```
## markdown
* 类型: `Object|Function`
参考 [Markdown 配置](zh-cn/markdown.md)。
```js
window.$docsify = {
// object
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
},
// function
markdown: function(marked, renderer) {
// ...
return marked;
}
};
```
## themeColor
* 类型:`String`
替换主题色。利用 [CSS3 支持变量](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables)的特性,对于老的浏览器有 polyfill 处理。
```js
window.$docsify = {
themeColor: '#3F51B5'
};
```
## alias
* 类型:`Object`
定义路由别名,可以更自由的定义路由规则。 支持正则。
```js
window.$docsify = {
alias: {
'/foo/(+*)': '/bar/$1', // supports regexp
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_sidebar.md': '/_sidebar.md' // See #301
}
};
```
## autoHeader
* 类型:`Boolean`
同时设置 `loadSidebar``autoHeader` 后,可以根据 `_sidebar.md` 的内容自动为每个页面增加标题。[#78](https://github.com/QingWei-Li/docsify/issues/78)
```js
window.$docsify = {
loadSidebar: true,
autoHeader: true
};
```
## executeScript
* 类型:`Boolean`
执行文档里的 script 标签里的脚本,只执行第一个 script ([demo](zh-cn/themes.md))。 如果 Vue 存在,则自动开启。
```js
window.$docsify = {
executeScript: true
};
```
```markdown
## This is test
<script>
console.log(2333)
</script>
```
注意如果执行的是一个外链脚本,比如 jsfiddle 的内嵌 demo请确保引入 [external-script](plugins.md?id=外链脚本-external-script) 插件。
## noEmoji
* type: `Boolean`
禁用 emoji 解析。
```js
window.$docsify = {
noEmoji: true
};
```
## mergeNavbar
* type: `Boolean`
小屏设备下合并导航栏到侧边栏。
```js
window.$docsify = {
mergeNavbar: true
};
```
## formatUpdated
* type: `String|Function`
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`。参考 https://github.com/lukeed/tinydate#patterns
```js
window.$docsify = {
formatUpdated: '{MM}/{DD} {HH}:{mm}',
formatUpdated: function(time) {
// ...
return time;
}
};
```
## externalLinkTarget
* type: `String`
* default: `_blank`
当前默认为 \_blank, 配置一下就可以:
```js
window.$docsify = {
externalLinkTarget: '_self' // default: '_blank'
};
```
## routerMode
* type: `String`
* default: `history`
```js
window.$docsify = {
routerMode: 'history' // default: 'hash'
};
```
## noCompileLinks
* 类型: `Array`
有时我们不希望 docsify 处理我们的链接。 参考 [#203](https://github.com/QingWei-Li/docsify/issues/203)
```js
window.$docsify = {
noCompileLinks: ['/foo', '/bar/.*']
};
```
## requestHeaders
* type: `Object`
设置请求资源的请求头。
```js
window.$docsify = {
requestHeaders: {
'x-token': 'xxx'
}
};
```
## ext
* type: `String`
资源的文件扩展名。
```js
window.$docsify = {
ext: '.md'
};
```

View file

@ -1,99 +0,0 @@
# 封面
通过设置 `coverpage` 参数,可以开启渲染封面的功能。具体用法见[配置项#coverpage](configuration.md#coverpage)。
## 基本用法
封面的生成同样是从 markdown 文件渲染来的。开启渲染封面功能后在文档根目录创建 `_coverpage.md` 文件。渲染效果如本文档。
_index.html_
```html
<script>
window.$docsify = {
coverpage: true
}
</script>
<script src="//unpkg.com/docsify"></script>
```
_\_coverpage.md_
```markdown
![logo](_media/icon.svg)
# docsify
> 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 语法设置背景。
_\_coverpage.md_
```markdown
# docsify
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- 背景图片 -->
![](_media/bg.png)
<!-- 背景色 -->
![color](#f0f0f0)
```
## 封面作为首页
通常封面和首页是同时出现的,当然你也是当封面独立出来通过设置[onlyCover 选项](zh-cn/configuration.md#onlycover)。
## 多个封面
如果你的文档网站是多语言的,或许你需要设置多个封面。
例如你的文档目录结构如下
```text
.
└── docs
├── README.md
├── guide.md
├── _coverpage.md
└── zh-cn
├── README.md
└── guide.md
└── _coverpage.md
```
那么你可以这么配置
```js
window.$docsify = {
coverpage: ['/', '/zh-cn/']
};
```
或者具体指名文件名
```js
window.$docsify = {
coverpage: {
'/': 'cover.md',
'/zh-cn/': 'cover.md'
}
};
```

View file

@ -1,64 +0,0 @@
# 自定义导航栏
我们可以直接在 HTML 里定义导航栏,要注意链接要以 `#/` 开头。
_index.html_
```html
<body>
<nav>
<a href="#/">EN</a>
<a href="#/zh-cn/">中文</a>
</nav>
<div id="app"></div>
</body>
```
## 配置文件
那我们可以通过 Markdown 文件来配置导航。首先配置 `loadNavbar`,默认加载的文件为 `_navbar.md`。具体配置规则见[配置项#loadNavbar](configuration.md#loadnavbar)。
_index.html_
```html
<script>
window.$docsify = {
loadNavbar: true
}
</script>
<script src="//unpkg.com/docsify"></script>
```
_\_navbar.md_
```markdown
* [En](/)
* [中文](/zh-cn/)
```
`_navbar.md` 加载逻辑和 `sidebar` 文件一致,从每层目录下获取。例如当前路由为 `/zh-cn/custom-navbar` 那么是从 `/zh-cn/_navbar.md` 获取导航栏。
## 嵌套
如果导航内容过多,可以写成嵌套的列表,会被渲染成下拉列表的形式。
_\_navbar.md_
```markdown
* 基础
* [快速开始](zh-cn/quickstart.md)
* [多页文档](zh-cn/more-pages.md)
* [定制导航栏](zh-cn/custom-navbar.md)
* [封面](zh-cn/cover.md)
* 配置
* [配置项](zh-cn/configuration.md)
* [主题](zh-cn/themes.md)
* [使用插件](zh-cn/plugins.md)
* [Markdown 配置](zh-cn/markdown.md)
* [代码高亮](zh-cn/language-highlight.md)
```
效果图
![嵌套导航栏](_images/zh-cn/nested-navbar.png '嵌套导航栏')

View file

@ -1,58 +0,0 @@
# 部署
和 GitBook 生成的文档一样,我们可以直接把文档网站部署到 GitHub Pages 或者 VPS 上。
## GitHub Pages
GitHub Pages 支持从三个地方读取文件
- `docs/` 目录
- master 分支
- gh-pages 分支
我们推荐直接将文档放在 `docs/` 目录下,在设置页面开启 **GitHub Pages** 功能并选择 `master branch /docs folder` 选项。
![github pages](_images/deploy-github-pages.png)
!> 可以将文档放在根目录下,然后选择 **master 分支** 作为文档目录。
## GitLab Pages
如果你正在部署你的主分支, 在 `.gitlab-ci.yml` 中包含以下脚本:
?> `.public` 的解决方法是这样的,`cp` 不会无限循环的将 `public/` 复制到自身。
``` YAML
pages:
stage: deploy
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
```
!> 你可以用 `- cp -r docs/. public` 替换脚本, 如果 `./docs` 是你的 docsify 子文件夹。
## VPS
和部署所有静态网站一样,只需将服务器的访问根目录设定为 `index.html` 文件。
例如 nginx 的配置
```nginx
server {
listen 80;
server_name your.domain.com;
location / {
alias /path/to/dir/of/docs;
index index.html;
}
}
```

View file

@ -1,63 +0,0 @@
# 文件嵌入
docsify 4.6 开始支持嵌入任何类型的文件到文档里。你可以将文件当成 `iframe``video``audio` 或者 `code block`,如果是 Markdown 文件,甚至可以直接插入到当前文档里。
这是一个嵌入 Markdown 文件的例子。
```markdown
[filename](_media/example.md ':include')
```
`example.md` 文件的内容将会直接显示在这里
[filename](_media/example.md ':include')
你可以查看 [example.md](_media/example.md ':ignore') 原始内容对比效果。
通常情况下,这样的语法将会被当作链接处理。但是在 docsify 里,如果你添加一个 `:include` 选项,它就会被当作文件嵌入。
## 嵌入的类型
当前,嵌入的类型是通过文件后缀自动识别的,这是目前支持的类型:
* **iframe** `.html`, `.htm`
* **markdown** `.markdown`, `.md`
* **audio** `.mp3`
* **video** `.mp4`, `.ogg`
* **code** other file extension
当然,你也可以强制设置嵌入类型。例如你想将 Markdown 文件当作一个 `code block` 嵌入。
```markdown
[filename](_media/example.md ':include :type=code')
```
你将得到
[filename](_media/example.md ':include :type=code')
## 标签属性
如果你嵌入文件是一个 `iframe``audio` 或者 `video`,你可以给这些标签设置属性。
```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')
看见没?你只需要直接写属性就好了,每个标签有哪些属性建议你查看 [MDN 文档](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)。
## 代码块高亮
如果是嵌入一个代码块,你可以设置高亮的语言,或者让它自动识别。这里是手动设置高亮语言
```markdown
[](_media/example.html ':include :type=code text')
```
⬇️
[](_media/example.html ':include :type=code text')
?> 如何高亮代码?你可以查看[这份文档](language-highlight.md).

View file

@ -1,72 +0,0 @@
# 文档助手
docsify 扩展了一些 Markdown 语法,可以让文档更易读。
## 强调内容
适合显示重要的提示信息,语法为 `!> 内容`
```markdown
!> 一段重要的内容,可以和其他 **Markdown** 语法混用。
```
!> 一段重要的内容,可以和其他 **Markdown** 语法混用。
## 普通提示
普通的提示信息,比如写 TODO 或者参考内容等。
```markdown
?> _TODO_ 完善示例
```
?> _TODO_ 完善示例
## 忽略编译链接
有时候我们会把其他一些相对路径放到链接上,你必须告诉 docsify 你不需要编译这个链接。 例如:
```md
[link](/demo/)
```
它将被编译为 `<a href="/#/demo/">link</a>` 并将加载 `/demo/README.md`. 可能你想跳转到 `/demo/index.html`
现在你可以做到这一点
```md
[link](/demo/ ':ignore')
```
即将会得到 `<a href="/demo/">link</a>` html 代码。不要担心,你仍然可以为链接设置标题。
```md
[link](/demo/ ':ignore title')
<a href="/demo/" title="title">link</a>
```
## 设置链接的 target 属性
```md
[link](/demo ':target=_blank')
[link](/demo2 ':target=_self')
```
## Github 任务列表
```md
* [ ] foo
* bar
* [x] baz
* [] bam <~ not working
* [ ] bim
* [ ] lim
```
* [ ] foo
* bar
* [x] baz
* [] bam <~ not working
* [ ] bim
* [ ] lim

View file

@ -1,11 +0,0 @@
# 代码高亮
内置的代码高亮工具是 [Prism](https://github.com/PrismJS/prism),默认支持 CSS、JavaScript 和 HTML。如果需要高亮其语言——例如 PHP——可以手动引入代码高亮插件。
```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>
```
?> 其他的语言高亮插件可以查看[Prims 仓库](https://github.com/PrismJS/prism/tree/gh-pages/components)。

View file

@ -1,56 +0,0 @@
# Markdown 配置
内置的 Markdown 解析器是 [marked](https://github.com/chjj/marked),可以修改它的配置。同时可以直接配置 `renderer`
```js
window.$docsify = {
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
}
}
```
?> 完整配置参数参考 [marked 文档](https://github.com/chjj/marked#options-1)
当然也可以完全定制 Markdown 解析规则。
```js
window.$docsify = {
markdown: function(marked, renderer) {
// ...
return marked
}
}
```
## 支持 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>
mermaid.initialize({ startOnLoad: false });
window.$docsify = {
markdown: {
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
);
}
return this.origin.code.apply(this, arguments);
}
}
}
}
```

View file

@ -1,100 +0,0 @@
# 多页文档
如果需要创建多个页面,或者需要多级路由的网站,在 docsify 里也能很容易的实现。例如创建一个 `guide.md` 文件,那么对应的路由就是 `/#/guide`
假设你的目录结构如下:
```text
-| docs/
-| README.md
-| guide.md
-| zh-cn/
-| README.md
-| guide.md
```
那么对应的访问页面将是
```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
```
## 定制侧边栏
默认情况下,侧边栏会根据当前文档的标题生成目录。也可以设置文档链接,通过 Markdown 文件生成,效果如当前的文档的侧边栏。
首先配置 `loadSidebar` 选项,具体配置规则见[配置项#loadSidebar](configuration.md#loadsidebar)。
```html
<script>
window.$docsify = {
loadSidebar: true
}
</script>
<script src="//unpkg.com/docsify"></script>
```
接着创建 `_sidebar.md` 文件,内容如下
```markdown
* [首页](zh-cn/)
* [指南](zh-cn/guide)
```
!> 需要在文档根目录创建 `.nojekyll` 命名的空文件,阻止 GitHub Pages 忽略命名是下划线开头的文件。
`_sidebar.md` 的加载逻辑是从每层目录下获取文件,如果当前目录不存在该文件则回退到上一级目录。例如当前路径为 `/zh-cn/more-pages` 则从 `/zh-cn/_sidebar.md` 获取文件,如果不存在则从 `/_sidebar.md` 获取。
当然你也可以配置 `alias` 避免不必要的回退过程。
```html
<script>
window.$docsify = {
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
}
}
</script>
```
## 显示目录
自定义侧边栏同时也可以开启目录功能。设置 `subMaxLevel` 配置项,具体介绍见 [配置项#sub-max-level](zh-cn/configuration#sub-max-level)。
```html
<script>
window.$docsify = {
loadSidebar: true,
subMaxLevel: 2
}
</script>
<script src="//unpkg.com/docsify"></script>
```
## 忽略副标题
当设置了 `subMaxLevel` 时,默认情况下每个标题都会自动添加到目录中。如果你想忽略特定的标题,可以给它添加  `{docsify-ignore}`
```markdown
# Getting Started
## Header {docsify-ignore}
该标题不会出现在侧边栏的目录中。
```
要忽略特定页面上的所有标题,你可以在页面的第一个标题上使用 `{docsify-ignore-all}`
```markdown
# Getting Started {docsify-ignore-all}
## Header
该标题不会出现在侧边栏的目录中。
```
在使用时, `{docsify-ignore}``{docsify-ignore-all}` 都不会在页面上呈现。

View file

@ -1,181 +0,0 @@
# 插件列表
## 全文搜索 - Search
全文搜索插件会根据当前页面上的超链接获取文档内容,在 `localStorage` 内建立文档索引。默认过期时间为一天,当然我们可以自己指定需要缓存的文件列表或者配置过期时间。
```html
<script>
window.$docsify = {
search: 'auto', // 默认值
search : [
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
// 完整配置参数
search: {
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
paths: [], // or 'auto'
placeholder: 'Type to search',
// 支持本地化
placeholder: {
'/zh-cn/': '搜索',
'/': 'Type to search'
},
noData: 'No Results!',
// 支持本地化
noData: {
'/zh-cn/': '找不到结果',
'/': 'No Results'
},
// 搜索标题的最大程级, 1 - 6
depth: 2
}
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
## 谷歌统计 - Google Analytics
需要配置 track id 才能使用。
```html
<script>
window.$docsify = {
ga: 'UA-XXXXX-Y'
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
也可以通过 `data-ga` 配置 id。
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
## emoji
默认是提供 emoji 解析的,能将类似 `:100:` 解析成 :100:。但是它不是精准的,因为没有处理非 emoji 的字符串。如果你需要正确解析 emoji 字符串,你可以引入这个插件。
```html
<script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
```
## 外链脚本 - External Script
如果文档里的 script 是内联脚本,可以直接执行;而如果是外链脚本(即 js 文件内容由 `src` 属性引入),则需要使用此插件。
```html
<script src="//unpkg.com/docsify/lib/plugins/external-script.js"></script>
```
## 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.
## 图片缩放 - Zoom image
Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
```
忽略某张图片
```markdown
![](image.png ':no-zoom')
```
## 在 Github 上编辑
在每一页上添加 `Edit on github` 按钮. 由第三方库提供, 查看 [document](https://github.com/njleonzhang/docsify-edit-on-github)
## 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
<link rel="stylesheet" href="//unpkg.com/docsify-copy-code/styles.css">
<script src="//unpkg.com/docsify-copy-code/index.js"></script>
```
```javascript
window.$docsify = {
plugins: [
window.DocsifyCopyCodePlugin.init()
]
}
```
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>
```
## Navigation
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>
```

View file

@ -1,113 +0,0 @@
# 离线模式
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/)(PWA) 是一项融合 Web 和 Native 应用各项优点的解决方案。我们可以利用其支持离线功能的特点,让我们的网站可以在信号差或者离线状态下正常运行。
要使用它也非常容易。
## 创建 serviceWorker
这里已经整理好了一份代码,你只需要在网站根目录下创建一个 `sw.js` 文件,并粘贴下面的代码。
*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 */ })
)
}
})
```
## 注册
现在,到 `index.html` 里注册它。这个功能只能工作在一些现代浏览器上,所以我们需要加个判断。
*index.html*
```html
<script>
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
}
</script>
```
## 体验一下
发布你的网站,并开始享受离线模式的魔力吧!:ghost: 当然你现在看到的 docsify 的文档网站已经支持离线模式了,你可以关掉 Wi-Fi 体验一下。

View file

@ -1,90 +0,0 @@
# 快速开始
推荐安装 `docsify-cli` 工具,可以方便创建及本地预览文档网站。
```bash
npm i docsify-cli -g
```
## 初始化项目
如果想在项目的 `./docs` 目录里写文档,直接通过 `init` 初始化项目。
```bash
docsify init ./docs
```
## 开始写文档
初始化成功后,可以看到 `./docs` 目录下创建的几个文件
- `index.html` 入口文件
- `README.md` 会做为主页内容渲染
- `.nojekyll` 用于阻止 GitHub Pages 会忽略掉下划线开头的文件
直接编辑 `docs/README.md` 就能更新网站内容,当然也可以[写多个页面](zh-cn/more-pages.md)。
## 本地预览网站
运行一个本地服务器通过 `docsify serve` 可以方便的预览效果,而且提供 LiveReload 功能,可以让实时的预览。默认访问 http://localhost:3000 。
```bash
docsify serve docs
```
?> 更多命令行工具用法,参考 [docsify-cli 文档](https://github.com/QingWei-Li/docsify-cli)。
## 手动初始化
如果不喜欢 npm 或者觉得安装工具太麻烦,我们其实只需要直接创建一个 `index.html` 文件。
*index.html*
```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>
```
如果系统里安装 Python 的话,也可以很轻易的启动一个静态服务器。
```bash
cd docs && python -m SimpleHTTPServer 3000
```
## Loading 提示
初始化时会显示 `Loading...` 内容,你可以自定义提示信息。
*index.html*
```html
<div id="app">加载中</div>
```
如果更改了 `el` 的配置,需要将该元素加上 `data-app` 属性。
*index.html*
```html
<div data-app id="main">加载中</div>
<script>
window.$docsify = {
el: '#main'
}
</script>
```

View file

@ -1,118 +0,0 @@
# 服务端渲染SSR
先看例子 https://docsify.now.sh
项目地址在 https://github.com/QingWei-Li/docsify-ssr-demo
![](https://dn-mhke0kuv.qbox.me/2bfef08c592706108055.png)
文档依旧是部署在 GitHub Pages 上Node 服务部署在 now.sh 里,渲染的内容是从 GitHub Pages 上同步过来的。所以静态部署文档的服务器和服务端渲染的 Node 服务器是分开的,也就是说你还是可以用之前的方式更新文档,并不需要每次都部署。
## 快速开始
如果你熟悉 `now` 的使用,接下来的介绍就很简单了。先创建一个新项目,并安装 `now``docsify-cli`
```bash
mkdir my-ssr-demo && cd my-ssr-demo
npm init -y
npm i now docsify-cli -D
```
配置 `package.json`
```json
{
"scripts": {
"start": "docsify start .",
"deploy": "now -p"
},
"docsify": {
"config": {
"basePath": "https://docsify.js.org/",
"loadSidebar": true,
"loadNavbar": true
}
}
}
```
如果你还没有创建文档,可以参考[之前的文章](https://zhuanlan.zhihu.com/p/24540753)。其中 `basePath` 为文档所在的路径,可以填你的 docsify 文档网站。
配置可以单独写在配置文件内,然后通过 `--config config.js` 加载。
渲染的基础模版也可以自定义,配置在 `template` 属性上,例如
```js
"docsify": {
"template": "./ssr.html",
"config": {
"basePath": "https://docsify.js.org/",
"loadSidebar": true,
"loadNavbar": true
}
}
```
*ssr.html*
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>docsify</title>
<link rel="icon" href="_media/favicon.ico">
<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" title="vue">
</head>
<body>
<!--inject-app-->
<!--inject-config-->
</body>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</html>
```
其中 `<!--inject-app-->``<!--inject-config-->` 为占位符,会自动将渲染后的 html 和配置内容注入到页面上。
现在,你可以运行 `npm start` 预览效果,如果没有问题就通过 `npm run deploy` 部署服务。
```bash
npm start
# open http://localhost:4000
npm run deploy
# now ...
```
## 更多玩法
`docsify start` 其实是依赖了 [`docsify-server-renderer`](https://npmarket.surge.sh/?name=docsify-server-renderer) 模块,如果你感兴趣,你完全可以用它自己实现一个 server可以加入缓存等功能。
```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: 'qingwei-li/docsify'
}
})
renderer.renderToString(url)
.then(html => {})
.catch(err => {})
```
当然文档文件和 server 也是可以部署在一起的,`basePath` 不是一个 URL 的话就会当做文件路径处理,也就是从服务器上加载资源。

View file

@ -1,56 +0,0 @@
# 主题
目前提供三套主题可供选择,模仿 [Vue](//vuejs.org) 和 [buble](//buble.surge.sh) 官网订制的主题样式。还有 [@liril-net](https://github.com/liril-net) 贡献的黑色风格的主题。
```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">
```
!> CSS 的压缩文件位于 `/lib/themes/`
```html
<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">
```
如果你有其他想法或者想开发别的主题,欢迎提 [PR](https://github.com/QingWei-Li/docsify/pulls)。
#### 点击切换主题
<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 {
text-decoration: underline;
cursor: pointer;
}
</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>

View file

@ -1,112 +0,0 @@
# 兼容 Vue
你可以直接在 Markdown 文件里写 Vue 代码,它将被执行。我们可以用它写一些 Vue 的 Demo 或者示例代码。
## 基础用法
`index.html` 里引入 Vue。
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
```
接着就可以愉快地在 Markdown 里写 Vue 了。默认会执行 `new Vue({ el: '#main' })` 创建示例。
*README.md*
```markdown
# Vue 介绍
`v-for` 的用法
```html
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
``
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
```
当然你也可以手动初始化 Vue这样你可以自定义一些配置。
*README.md*
```markdown
# Vue 的基本用法
<div>hello {{ msg }}</div>
<script>
new Vue({
el: '#main',
data: { msg: 'Vue' }
})
</script>
```
!> 一个 Markdown 文件里只有第一个 `script` 标签内的内容会被执行。
## 搭配 Vuep 写 Playground
[Vuep](https://github.com/QingWei-Li/vuep) 是一个提供在线编辑和预览效果的 Vue 组件,搭配 docsify 可以直接在文档里写 Vue 的示例代码,支持 Vue component spec 和 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>
```
<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>
?> 具体效果参考 [Vuep 文档](https://qingwei-li.github.io/vuep/)。

View file

@ -1,94 +0,0 @@
# 自定义插件
docsify 提供了一套插件机制其中提供的钩子hook支持处理异步逻辑可以很方便的扩展功能。
## 完整功能
```js
window.$docsify = {
plugins: [
function (hook, vm) {
hook.init(function() {
// 初始化时调用,只调用一次,没有参数。
})
hook.beforeEach(function(content) {
// 每次开始解析 Markdown 内容时调用
// ...
return content
})
hook.afterEach(function(html, next) {
// 解析成 html 后调用。beforeEach 和 afterEach 支持处理异步逻辑
// ...
// 异步处理完成后调用 next(html) 返回结果
next(html)
})
hook.doneEach(function() {
// 每次路由切换时数据全部加载完成后调用,没有参数。
// ...
})
hook.mounted(function() {
// 初始化完成后调用 ,只调用一次,没有参数。
})
hook.ready(function() {
// 初始化并第一次加完成数据后调用,没有参数。
})
}
]
}
```
!> 如果需要用 docsify 的内部方法,可以通过 `window.Docsify` 获取,通过 `vm` 获取当前实例。
## 例子
### footer
给每个页面的末尾加上 `footer`
```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/QingWei-Li/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/QingWei-Li/docsify/blob/master/docs' + vm.route.file
var editHtml = '[📝 EDIT DOCUMENT](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
```

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>

File diff suppressed because it is too large Load diff

1
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,54 +0,0 @@
(function () {
var fixedPath = location.href.replace('/-/', '/#/');
if (fixedPath !== location.href) {
location.href = fixedPath;
}
function install (hook, vm) {
var dom = Docsify.dom;
var disqus = vm.config.disqus;
if (!disqus) {
throw Error('$docsify.disqus is required')
}
hook.init(function (_) {
var script = dom.create('script');
script.async = true;
script.src = "https://" + disqus + ".disqus.com/embed.js";
script.setAttribute('data-timestamp', +new Date());
dom.appendTo(dom.body, script);
});
hook.mounted(function (_) {
var div = dom.create('div');
div.id = 'disqus_thread';
var main = dom.getNode('#main');
div.style = "width: " + (main.clientWidth) + "px; margin: 0 auto 20px;";
dom.appendTo(dom.find('.content'), div);
// eslint-disable-next-line
window.disqus_config = function() {
this.page.url = location.origin + '/-' + vm.route.path;
this.page.identifier = vm.route.path;
this.page.title = document.title;
};
});
hook.doneEach(function (_) {
if (typeof window.DISQUS !== 'undefined') {
window.DISQUS.reset({
reload: true,
config: function () {
this.page.url = location.origin + '/-' + vm.route.path;
this.page.identifier = vm.route.path;
this.page.title = document.title;
}
});
}
});
}
$docsify.plugins = [].concat(install, $docsify.plugins);
}());

View file

@ -1 +0,0 @@
!function(){var i=location.href.replace("/-/","/#/");i!==location.href&&(location.href=i);$docsify.plugins=[].concat(function(i,t){var e=Docsify.dom,o=t.config.disqus;if(!o)throw Error("$docsify.disqus is required");i.init(function(i){var t=e.create("script");t.async=!0,t.src="https://"+o+".disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),e.appendTo(e.body,t)}),i.mounted(function(i){var o=e.create("div");o.id="disqus_thread";var n=e.getNode("#main");o.style="width: "+n.clientWidth+"px; margin: 0 auto 20px;",e.appendTo(e.find(".content"),o),window.disqus_config=function(){this.page.url=location.origin+"/-"+t.route.path,this.page.identifier=t.route.path,this.page.title=document.title}}),i.doneEach(function(i){void 0!==window.DISQUS&&window.DISQUS.reset({reload:!0,config:function(){this.page.url=location.origin+"/-"+t.route.path,this.page.identifier=t.route.path,this.page.title=document.title}})})},$docsify.plugins)}();

View file

@ -1,903 +0,0 @@
(function () {
var AllGithubEmoji = [
'+1',
'100',
'1234',
'8ball',
'a',
'ab',
'abc',
'abcd',
'accept',
'aerial_tramway',
'airplane',
'alarm_clock',
'alien',
'ambulance',
'anchor',
'angel',
'anger',
'angry',
'anguished',
'ant',
'apple',
'aquarius',
'aries',
'arrow_backward',
'arrow_double_down',
'arrow_double_up',
'arrow_down',
'arrow_down_small',
'arrow_forward',
'arrow_heading_down',
'arrow_heading_up',
'arrow_left',
'arrow_lower_left',
'arrow_lower_right',
'arrow_right',
'arrow_right_hook',
'arrow_up',
'arrow_up_down',
'arrow_up_small',
'arrow_upper_left',
'arrow_upper_right',
'arrows_clockwise',
'arrows_counterclockwise',
'art',
'articulated_lorry',
'astonished',
'athletic_shoe',
'atm',
'b',
'baby',
'baby_bottle',
'baby_chick',
'baby_symbol',
'back',
'baggage_claim',
'balloon',
'ballot_box_with_check',
'bamboo',
'banana',
'bangbang',
'bank',
'bar_chart',
'barber',
'baseball',
'basketball',
'bath',
'bathtub',
'battery',
'bear',
'bee',
'beer',
'beers',
'beetle',
'beginner',
'bell',
'bento',
'bicyclist',
'bike',
'bikini',
'bird',
'birthday',
'black_circle',
'black_joker',
'black_large_square',
'black_medium_small_square',
'black_medium_square',
'black_nib',
'black_small_square',
'black_square_button',
'blossom',
'blowfish',
'blue_book',
'blue_car',
'blue_heart',
'blush',
'boar',
'boat',
'bomb',
'book',
'bookmark',
'bookmark_tabs',
'books',
'boom',
'boot',
'bouquet',
'bow',
'bowling',
'bowtie',
'boy',
'bread',
'bride_with_veil',
'bridge_at_night',
'briefcase',
'broken_heart',
'bug',
'bulb',
'bullettrain_front',
'bullettrain_side',
'bus',
'busstop',
'bust_in_silhouette',
'busts_in_silhouette',
'cactus',
'cake',
'calendar',
'calling',
'camel',
'camera',
'cancer',
'candy',
'capital_abcd',
'capricorn',
'car',
'card_index',
'carousel_horse',
'cat',
'cat2',
'cd',
'chart',
'chart_with_downwards_trend',
'chart_with_upwards_trend',
'checkered_flag',
'cherries',
'cherry_blossom',
'chestnut',
'chicken',
'children_crossing',
'chocolate_bar',
'christmas_tree',
'church',
'cinema',
'circus_tent',
'city_sunrise',
'city_sunset',
'cl',
'clap',
'clapper',
'clipboard',
'clock1',
'clock10',
'clock1030',
'clock11',
'clock1130',
'clock12',
'clock1230',
'clock130',
'clock2',
'clock230',
'clock3',
'clock330',
'clock4',
'clock430',
'clock5',
'clock530',
'clock6',
'clock630',
'clock7',
'clock730',
'clock8',
'clock830',
'clock9',
'clock930',
'closed_book',
'closed_lock_with_key',
'closed_umbrella',
'cloud',
'clubs',
'cn',
'cocktail',
'coffee',
'cold_sweat',
'collision',
'computer',
'confetti_ball',
'confounded',
'confused',
'congratulations',
'construction',
'construction_worker',
'convenience_store',
'cookie',
'cool',
'cop',
'copyright',
'corn',
'couple',
'couple_with_heart',
'couplekiss',
'cow',
'cow2',
'credit_card',
'crescent_moon',
'crocodile',
'crossed_flags',
'crown',
'cry',
'crying_cat_face',
'crystal_ball',
'cupid',
'curly_loop',
'currency_exchange',
'curry',
'custard',
'customs',
'cyclone',
'dancer',
'dancers',
'dango',
'dart',
'dash',
'date',
'de',
'deciduous_tree',
'department_store',
'diamond_shape_with_a_dot_inside',
'diamonds',
'disappointed',
'disappointed_relieved',
'dizzy',
'dizzy_face',
'do_not_litter',
'dog',
'dog2',
'dollar',
'dolls',
'dolphin',
'door',
'doughnut',
'dragon',
'dragon_face',
'dress',
'dromedary_camel',
'droplet',
'dvd',
'e-mail',
'ear',
'ear_of_rice',
'earth_africa',
'earth_americas',
'earth_asia',
'egg',
'eggplant',
'eight',
'eight_pointed_black_star',
'eight_spoked_asterisk',
'electric_plug',
'elephant',
'email',
'end',
'envelope',
'envelope_with_arrow',
'es',
'euro',
'european_castle',
'european_post_office',
'evergreen_tree',
'exclamation',
'expressionless',
'eyeglasses',
'eyes',
'facepunch',
'factory',
'fallen_leaf',
'family',
'fast_forward',
'fax',
'fearful',
'feelsgood',
'feet',
'ferris_wheel',
'file_folder',
'finnadie',
'fire',
'fire_engine',
'fireworks',
'first_quarter_moon',
'first_quarter_moon_with_face',
'fish',
'fish_cake',
'fishing_pole_and_fish',
'fist',
'five',
'flags',
'flashlight',
'flipper',
'floppy_disk',
'flower_playing_cards',
'flushed',
'foggy',
'football',
'footprints',
'fork_and_knife',
'fountain',
'four',
'four_leaf_clover',
'fr',
'free',
'fried_shrimp',
'fries',
'frog',
'frowning',
'fu',
'fuelpump',
'full_moon',
'full_moon_with_face',
'game_die',
'gb',
'gem',
'gemini',
'ghost',
'gift',
'gift_heart',
'girl',
'globe_with_meridians',
'goat',
'goberserk',
'godmode',
'golf',
'grapes',
'green_apple',
'green_book',
'green_heart',
'grey_exclamation',
'grey_question',
'grimacing',
'grin',
'grinning',
'guardsman',
'guitar',
'gun',
'haircut',
'hamburger',
'hammer',
'hamster',
'hand',
'handbag',
'hankey',
'hash',
'hatched_chick',
'hatching_chick',
'headphones',
'hear_no_evil',
'heart',
'heart_decoration',
'heart_eyes',
'heart_eyes_cat',
'heartbeat',
'heartpulse',
'hearts',
'heavy_check_mark',
'heavy_division_sign',
'heavy_dollar_sign',
'heavy_exclamation_mark',
'heavy_minus_sign',
'heavy_multiplication_x',
'heavy_plus_sign',
'helicopter',
'herb',
'hibiscus',
'high_brightness',
'high_heel',
'hocho',
'honey_pot',
'honeybee',
'horse',
'horse_racing',
'hospital',
'hotel',
'hotsprings',
'hourglass',
'hourglass_flowing_sand',
'house',
'house_with_garden',
'hurtrealbad',
'hushed',
'ice_cream',
'icecream',
'id',
'ideograph_advantage',
'imp',
'inbox_tray',
'incoming_envelope',
'information_desk_person',
'information_source',
'innocent',
'interrobang',
'iphone',
'it',
'izakaya_lantern',
'jack_o_lantern',
'japan',
'japanese_castle',
'japanese_goblin',
'japanese_ogre',
'jeans',
'joy',
'joy_cat',
'jp',
'key',
'keycap_ten',
'kimono',
'kiss',
'kissing',
'kissing_cat',
'kissing_closed_eyes',
'kissing_heart',
'kissing_smiling_eyes',
'koala',
'koko',
'kr',
'lantern',
'large_blue_circle',
'large_blue_diamond',
'large_orange_diamond',
'last_quarter_moon',
'last_quarter_moon_with_face',
'laughing',
'leaves',
'ledger',
'left_luggage',
'left_right_arrow',
'leftwards_arrow_with_hook',
'lemon',
'leo',
'leopard',
'libra',
'light_rail',
'link',
'lips',
'lipstick',
'lock',
'lock_with_ink_pen',
'lollipop',
'loop',
'loud_sound',
'loudspeaker',
'love_hotel',
'love_letter',
'low_brightness',
'm',
'mag',
'mag_right',
'mahjong',
'mailbox',
'mailbox_closed',
'mailbox_with_mail',
'mailbox_with_no_mail',
'man',
'man_with_gua_pi_mao',
'man_with_turban',
'mans_shoe',
'maple_leaf',
'mask',
'massage',
'meat_on_bone',
'mega',
'melon',
'memo',
'mens',
'metal',
'metro',
'microphone',
'microscope',
'milky_way',
'minibus',
'minidisc',
'mobile_phone_off',
'money_with_wings',
'moneybag',
'monkey',
'monkey_face',
'monorail',
'moon',
'mortar_board',
'mount_fuji',
'mountain_bicyclist',
'mountain_cableway',
'mountain_railway',
'mouse',
'mouse2',
'movie_camera',
'moyai',
'muscle',
'mushroom',
'musical_keyboard',
'musical_note',
'musical_score',
'mute',
'nail_care',
'name_badge',
'neckbeard',
'necktie',
'negative_squared_cross_mark',
'neutral_face',
'new',
'new_moon',
'new_moon_with_face',
'newspaper',
'ng',
'night_with_stars',
'nine',
'no_bell',
'no_bicycles',
'no_entry',
'no_entry_sign',
'no_good',
'no_mobile_phones',
'no_mouth',
'no_pedestrians',
'no_smoking',
'non-potable_water',
'nose',
'notebook',
'notebook_with_decorative_cover',
'notes',
'nut_and_bolt',
'o',
'o2',
'ocean',
'octocat',
'octopus',
'oden',
'office',
'ok',
'ok_hand',
'ok_woman',
'older_man',
'older_woman',
'on',
'oncoming_automobile',
'oncoming_bus',
'oncoming_police_car',
'oncoming_taxi',
'one',
'open_book',
'open_file_folder',
'open_hands',
'open_mouth',
'ophiuchus',
'orange_book',
'outbox_tray',
'ox',
'package',
'page_facing_up',
'page_with_curl',
'pager',
'palm_tree',
'panda_face',
'paperclip',
'parking',
'part_alternation_mark',
'partly_sunny',
'passport_control',
'paw_prints',
'peach',
'pear',
'pencil',
'pencil2',
'penguin',
'pensive',
'performing_arts',
'persevere',
'person_frowning',
'person_with_blond_hair',
'person_with_pouting_face',
'phone',
'pig',
'pig2',
'pig_nose',
'pill',
'pineapple',
'pisces',
'pizza',
'point_down',
'point_left',
'point_right',
'point_up',
'point_up_2',
'police_car',
'poodle',
'poop',
'post_office',
'postal_horn',
'postbox',
'potable_water',
'pouch',
'poultry_leg',
'pound',
'pouting_cat',
'pray',
'princess',
'punch',
'purple_heart',
'purse',
'pushpin',
'put_litter_in_its_place',
'question',
'rabbit',
'rabbit2',
'racehorse',
'radio',
'radio_button',
'rage',
'rage1',
'rage2',
'rage3',
'rage4',
'railway_car',
'rainbow',
'raised_hand',
'raised_hands',
'raising_hand',
'ram',
'ramen',
'rat',
'recycle',
'red_car',
'red_circle',
'registered',
'relaxed',
'relieved',
'repeat',
'repeat_one',
'restroom',
'revolving_hearts',
'rewind',
'ribbon',
'rice',
'rice_ball',
'rice_cracker',
'rice_scene',
'ring',
'rocket',
'roller_coaster',
'rooster',
'rose',
'rotating_light',
'round_pushpin',
'rowboat',
'ru',
'rugby_football',
'runner',
'running',
'running_shirt_with_sash',
'sa',
'sagittarius',
'sailboat',
'sake',
'sandal',
'santa',
'satellite',
'satisfied',
'saxophone',
'school',
'school_satchel',
'scissors',
'scorpius',
'scream',
'scream_cat',
'scroll',
'seat',
'secret',
'see_no_evil',
'seedling',
'seven',
'shaved_ice',
'sheep',
'shell',
'ship',
'shipit',
'shirt',
'shit',
'shoe',
'shower',
'signal_strength',
'six',
'six_pointed_star',
'ski',
'skull',
'sleeping',
'sleepy',
'slot_machine',
'small_blue_diamond',
'small_orange_diamond',
'small_red_triangle',
'small_red_triangle_down',
'smile',
'smile_cat',
'smiley',
'smiley_cat',
'smiling_imp',
'smirk',
'smirk_cat',
'smoking',
'snail',
'snake',
'snowboarder',
'snowflake',
'snowman',
'sob',
'soccer',
'soon',
'sos',
'sound',
'space_invader',
'spades',
'spaghetti',
'sparkle',
'sparkler',
'sparkles',
'sparkling_heart',
'speak_no_evil',
'speaker',
'speech_balloon',
'speedboat',
'squirrel',
'star',
'star2',
'stars',
'station',
'statue_of_liberty',
'steam_locomotive',
'stew',
'straight_ruler',
'strawberry',
'stuck_out_tongue',
'stuck_out_tongue_closed_eyes',
'stuck_out_tongue_winking_eye',
'sun_with_face',
'sunflower',
'sunglasses',
'sunny',
'sunrise',
'sunrise_over_mountains',
'surfer',
'sushi',
'suspect',
'suspension_railway',
'sweat',
'sweat_drops',
'sweat_smile',
'sweet_potato',
'swimmer',
'symbols',
'syringe',
'tada',
'tanabata_tree',
'tangerine',
'taurus',
'taxi',
'tea',
'telephone',
'telephone_receiver',
'telescope',
'tennis',
'tent',
'thought_balloon',
'three',
'thumbsdown',
'thumbsup',
'ticket',
'tiger',
'tiger2',
'tired_face',
'tm',
'toilet',
'tokyo_tower',
'tomato',
'tongue',
'top',
'tophat',
'tractor',
'traffic_light',
'train',
'train2',
'tram',
'triangular_flag_on_post',
'triangular_ruler',
'trident',
'triumph',
'trolleybus',
'trollface',
'trophy',
'tropical_drink',
'tropical_fish',
'truck',
'trumpet',
'tshirt',
'tulip',
'turtle',
'tv',
'twisted_rightwards_arrows',
'two',
'two_hearts',
'two_men_holding_hands',
'two_women_holding_hands',
'u5272',
'u5408',
'u55b6',
'u6307',
'u6708',
'u6709',
'u6e80',
'u7121',
'u7533',
'u7981',
'u7a7a',
'uk',
'umbrella',
'unamused',
'underage',
'unlock',
'up',
'us',
'v',
'vertical_traffic_light',
'vhs',
'vibration_mode',
'video_camera',
'video_game',
'violin',
'virgo',
'volcano',
'vs',
'walking',
'waning_crescent_moon',
'waning_gibbous_moon',
'warning',
'watch',
'water_buffalo',
'watermelon',
'wave',
'wavy_dash',
'waxing_crescent_moon',
'waxing_gibbous_moon',
'wc',
'weary',
'wedding',
'whale',
'whale2',
'wheelchair',
'white_check_mark',
'white_circle',
'white_flower',
'white_large_square',
'white_medium_small_square',
'white_medium_square',
'white_small_square',
'white_square_button',
'wind_chime',
'wine_glass',
'wink',
'wolf',
'woman',
'womans_clothes',
'womans_hat',
'womens',
'worried',
'wrench',
'x',
'yellow_heart',
'yen',
'yum',
'zap',
'zero',
'zzz'
];
// emoji from All-Github-Emoji-Icons
// https://github.com/scotch-io/All-Github-Emoji-Icons
window.emojify = function (match, $1) {
return AllGithubEmoji.indexOf($1) === -1
? match
: '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/' +
$1 +
'.png" alt="' +
$1 +
'" />'
};
}());

File diff suppressed because one or more lines are too long

View file

@ -1,28 +0,0 @@
(function () {
function handleExternalScript () {
var container = Docsify.dom.getNode('#main');
var scripts = Docsify.dom.findAll(container, 'script');
for (var i = scripts.length; i--;) {
var script = scripts[i];
if (script && script.src) {
var newScript = document.createElement('script');
Array.prototype.slice.call(script.attributes).forEach(function (attribute) {
newScript[attribute.name] = attribute.value;
});
script.parentNode.insertBefore(newScript, script);
script.parentNode.removeChild(script);
}
}
}
var install = function (hook) {
hook.doneEach(handleExternalScript);
};
window.$docsify.plugins = [].concat(install, window.$docsify.plugins);
}());

View file

@ -1 +0,0 @@
!function(){function o(){for(var o=Docsify.dom.getNode("#main"),e=Docsify.dom.findAll(o,"script"),n=e.length;n--;){var i=e[n];if(i&&i.src){var t=document.createElement("script");Array.prototype.slice.call(i.attributes).forEach(function(o){t[o.name]=o.value}),i.parentNode.insertBefore(t,i),i.parentNode.removeChild(i)}}}window.$docsify.plugins=[].concat(function(e){e.doneEach(o)},window.$docsify.plugins)}();

View file

@ -1,496 +0,0 @@
(function () {
/**
* Fork https://github.com/egoist/docute/blob/master/src/utils/yaml.js
*/
/* eslint-disable */
/*
YAML parser for Javascript
Author: Diogo Costa
This program is released under the MIT License as follows:
Copyright (c) 2011 Diogo Costa (costa.h4evr@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
* @name YAML
* @namespace
*/
var errors = [];
var reference_blocks = [];
var processing_time = 0;
var regex$1 = {
regLevel: new RegExp('^([\\s\\-]+)'),
invalidLine: new RegExp('^\\-\\-\\-|^\\.\\.\\.|^\\s*#.*|^\\s*$'),
dashesString: new RegExp('^\\s*\\"([^\\"]*)\\"\\s*$'),
quotesString: new RegExp("^\\s*\\'([^\\']*)\\'\\s*$"),
float: new RegExp('^[+-]?[0-9]+\\.[0-9]+(e[+-]?[0-9]+(\\.[0-9]+)?)?$'),
integer: new RegExp('^[+-]?[0-9]+$'),
array: new RegExp('\\[\\s*(.*)\\s*\\]'),
map: new RegExp('\\{\\s*(.*)\\s*\\}'),
key_value: new RegExp('([a-z0-9_-][ a-z0-9_-]*):( .+)', 'i'),
single_key_value: new RegExp('^([a-z0-9_-][ a-z0-9_-]*):( .+?)$', 'i'),
key: new RegExp('([a-z0-9_-][ a-z0-9_-]+):( .+)?', 'i'),
item: new RegExp('^-\\s+'),
trim: new RegExp('^\\s+|\\s+$'),
comment: new RegExp('([^\\\'\\"#]+([\\\'\\"][^\\\'\\"]*[\\\'\\"])*)*(#.*)?')
};
/**
* @class A block of lines of a given level.
* @param {int} lvl The block's level.
* @private
*/
function Block(lvl) {
return {
/* The block's parent */
parent: null,
/* Number of children */
length: 0,
/* Block's level */
level: lvl,
/* Lines of code to process */
lines: [],
/* Blocks with greater level */
children: [],
/* Add a block to the children collection */
addChild: function(obj) {
this.children.push(obj);
obj.parent = this;
++this.length;
}
}
}
function parser$1(str) {
var regLevel = regex$1['regLevel'];
var invalidLine = regex$1['invalidLine'];
var lines = str.split('\n');
var m;
var level = 0,
curLevel = 0;
var blocks = [];
var result = new Block(-1);
var currentBlock = new Block(0);
result.addChild(currentBlock);
var levels = [];
var line = '';
blocks.push(currentBlock);
levels.push(level);
for (var i = 0, len = lines.length; i < len; ++i) {
line = lines[i];
if (line.match(invalidLine)) {
continue
}
if ((m = regLevel.exec(line))) {
level = m[1].length;
} else { level = 0; }
if (level > curLevel) {
var oldBlock = currentBlock;
currentBlock = new Block(level);
oldBlock.addChild(currentBlock);
blocks.push(currentBlock);
levels.push(level);
} else if (level < curLevel) {
var added = false;
var k = levels.length - 1;
for (; k >= 0; --k) {
if (levels[k] == level) {
currentBlock = new Block(level);
blocks.push(currentBlock);
levels.push(level);
if (blocks[k].parent != null) { blocks[k].parent.addChild(currentBlock); }
added = true;
break
}
}
if (!added) {
errors.push('Error: Invalid indentation at line ' + i + ': ' + line);
return
}
}
currentBlock.lines.push(line.replace(regex$1['trim'], ''));
curLevel = level;
}
return result
}
function processValue(val) {
val = val.replace(regex$1['trim'], '');
var m = null;
if (val == 'true') {
return true
} else if (val == 'false') {
return false
} else if (val == '.NaN') {
return Number.NaN
} else if (val == 'null') {
return null
} else if (val == '.inf') {
return Number.POSITIVE_INFINITY
} else if (val == '-.inf') {
return Number.NEGATIVE_INFINITY
} else if ((m = val.match(regex$1['dashesString']))) {
return m[1]
} else if ((m = val.match(regex$1['quotesString']))) {
return m[1]
} else if ((m = val.match(regex$1['float']))) {
return parseFloat(m[0])
} else if ((m = val.match(regex$1['integer']))) {
return parseInt(m[0])
} else if (!isNaN((m = Date.parse(val)))) {
return new Date(m)
} else if ((m = val.match(regex$1['single_key_value']))) {
var res = {};
res[m[1]] = processValue(m[2]);
return res
} else if ((m = val.match(regex$1['array']))) {
var count = 0,
c = ' ';
var res = [];
var content = '';
var str = false;
for (var j = 0, lenJ = m[1].length; j < lenJ; ++j) {
c = m[1][j];
if (c == "'" || c == '"') {
if (str === false) {
str = c;
content += c;
continue
} else if ((c == "'" && str == "'") || (c == '"' && str == '"')) {
str = false;
content += c;
continue
}
} else if (str === false && (c == '[' || c == '{')) {
++count;
} else if (str === false && (c == ']' || c == '}')) {
--count;
} else if (str === false && count == 0 && c == ',') {
res.push(processValue(content));
content = '';
continue
}
content += c;
}
if (content.length > 0) { res.push(processValue(content)); }
return res
} else if ((m = val.match(regex$1['map']))) {
var count = 0,
c = ' ';
var res = [];
var content = '';
var str = false;
for (var j = 0, lenJ = m[1].length; j < lenJ; ++j) {
c = m[1][j];
if (c == "'" || c == '"') {
if (str === false) {
str = c;
content += c;
continue
} else if ((c == "'" && str == "'") || (c == '"' && str == '"')) {
str = false;
content += c;
continue
}
} else if (str === false && (c == '[' || c == '{')) {
++count;
} else if (str === false && (c == ']' || c == '}')) {
--count;
} else if (str === false && count == 0 && c == ',') {
res.push(content);
content = '';
continue
}
content += c;
}
if (content.length > 0) { res.push(content); }
var newRes = {};
for (var j = 0, lenJ = res.length; j < lenJ; ++j) {
if ((m = res[j].match(regex$1['key_value']))) {
newRes[m[1]] = processValue(m[2]);
}
}
return newRes
} else { return val }
}
function processFoldedBlock(block) {
var lines = block.lines;
var children = block.children;
var str = lines.join(' ');
var chunks = [str];
for (var i = 0, len = children.length; i < len; ++i) {
chunks.push(processFoldedBlock(children[i]));
}
return chunks.join('\n')
}
function processLiteralBlock(block) {
var lines = block.lines;
var children = block.children;
var str = lines.join('\n');
for (var i = 0, len = children.length; i < len; ++i) {
str += processLiteralBlock(children[i]);
}
return str
}
function processBlock(blocks) {
var m = null;
var res = {};
var lines = null;
var children = null;
var currentObj = null;
var level = -1;
var processedBlocks = [];
var isMap = true;
for (var j = 0, lenJ = blocks.length; j < lenJ; ++j) {
if (level != -1 && level != blocks[j].level) { continue }
processedBlocks.push(j);
level = blocks[j].level;
lines = blocks[j].lines;
children = blocks[j].children;
currentObj = null;
for (var i = 0, len = lines.length; i < len; ++i) {
var line = lines[i];
if ((m = line.match(regex$1['key']))) {
var key = m[1];
if (key[0] == '-') {
key = key.replace(regex$1['item'], '');
if (isMap) {
isMap = false;
if (typeof res.length === 'undefined') {
res = [];
}
}
if (currentObj != null) { res.push(currentObj); }
currentObj = {};
isMap = true;
}
if (typeof m[2] != 'undefined') {
var value = m[2].replace(regex$1['trim'], '');
if (value[0] == '&') {
var nb = processBlock(children);
if (currentObj != null) { currentObj[key] = nb; }
else { res[key] = nb; }
reference_blocks[value.substr(1)] = nb;
} else if (value[0] == '|') {
if (currentObj != null)
{ currentObj[key] = processLiteralBlock(children.shift()); }
else { res[key] = processLiteralBlock(children.shift()); }
} else if (value[0] == '*') {
var v = value.substr(1);
var no = {};
if (typeof reference_blocks[v] == 'undefined') {
errors.push("Reference '" + v + "' not found!");
} else {
for (var k in reference_blocks[v]) {
no[k] = reference_blocks[v][k];
}
if (currentObj != null) { currentObj[key] = no; }
else { res[key] = no; }
}
} else if (value[0] == '>') {
if (currentObj != null)
{ currentObj[key] = processFoldedBlock(children.shift()); }
else { res[key] = processFoldedBlock(children.shift()); }
} else {
if (currentObj != null) { currentObj[key] = processValue(value); }
else { res[key] = processValue(value); }
}
} else {
if (currentObj != null) { currentObj[key] = processBlock(children); }
else { res[key] = processBlock(children); }
}
} else if (line.match(/^-\s*$/)) {
if (isMap) {
isMap = false;
if (typeof res.length === 'undefined') {
res = [];
}
}
if (currentObj != null) { res.push(currentObj); }
currentObj = {};
isMap = true;
continue
} else if ((m = line.match(/^-\s*(.*)/))) {
if (currentObj != null) { currentObj.push(processValue(m[1])); }
else {
if (isMap) {
isMap = false;
if (typeof res.length === 'undefined') {
res = [];
}
}
res.push(processValue(m[1]));
}
continue
}
}
if (currentObj != null) {
if (isMap) {
isMap = false;
if (typeof res.length === 'undefined') {
res = [];
}
}
res.push(currentObj);
}
}
for (var j = processedBlocks.length - 1; j >= 0; --j) {
blocks.splice.call(blocks, processedBlocks[j], 1);
}
return res
}
function semanticAnalysis(blocks) {
var res = processBlock(blocks.children);
return res
}
function preProcess(src) {
var m;
var lines = src.split('\n');
var r = regex$1['comment'];
for (var i in lines) {
if ((m = lines[i].match(r))) {
/* var cmt = "";
if(typeof m[3] != "undefined")
lines[i] = m[1];
else if(typeof m[3] != "undefined")
lines[i] = m[3];
else
lines[i] = "";
*/
if (typeof m[3] !== 'undefined') {
lines[i] = m[0].substr(0, m[0].length - m[3].length);
}
}
}
return lines.join('\n')
}
function load(str) {
errors = [];
reference_blocks = [];
processing_time = new Date().getTime();
var pre = preProcess(str);
var doc = parser$1(pre);
var res = semanticAnalysis(doc);
processing_time = new Date().getTime() - processing_time;
return res
}
/**
* Fork https://github.com/egoist/docute/blob/master/src/utils/front-matter.js
*/
/* eslint-disable */
var optionalByteOrderMark = '\\ufeff?';
var pattern =
'^(' +
optionalByteOrderMark +
'(= yaml =|---)' +
'$([\\s\\S]*?)' +
'(?:\\2|\\.\\.\\.)' +
'$' +
'' +
'(?:\\n)?)';
// NOTE: If this pattern uses the 'g' flag the `regex` variable definition will
// need to be moved down into the functions that use it.
var regex = new RegExp(pattern, 'm');
function extractor(string) {
string = string || '';
var lines = string.split(/(\r?\n)/);
if (lines[0] && /= yaml =|---/.test(lines[0])) {
return parse(string)
} else {
return { attributes: {}, body: string }
}
}
function parse(string) {
var match = regex.exec(string);
if (!match) {
return {
attributes: {},
body: string
}
}
var yaml = match[match.length - 1].replace(/^\s+|\s+$/g, '');
var attributes = load(yaml) || {};
var body = string.replace(match[0], '');
return { attributes: attributes, body: body, frontmatter: yaml }
}
var install = function (hook, vm) {
hook.beforeEach(function (content) {
var ref = extractor(content);
var attributes = ref.attributes;
var body = ref.body;
Docsify.util.merge(vm.config, attributes.config);
return body
});
};
$docsify.plugins = [].concat(install, $docsify.plugins);
}());

View file

@ -1 +0,0 @@
!function(){var e=[],n=[],t=0,r={regLevel:new RegExp("^([\\s\\-]+)"),invalidLine:new RegExp("^\\-\\-\\-|^\\.\\.\\.|^\\s*#.*|^\\s*$"),dashesString:new RegExp('^\\s*\\"([^\\"]*)\\"\\s*$'),quotesString:new RegExp("^\\s*\\'([^\\']*)\\'\\s*$"),float:new RegExp("^[+-]?[0-9]+\\.[0-9]+(e[+-]?[0-9]+(\\.[0-9]+)?)?$"),integer:new RegExp("^[+-]?[0-9]+$"),array:new RegExp("\\[\\s*(.*)\\s*\\]"),map:new RegExp("\\{\\s*(.*)\\s*\\}"),key_value:new RegExp("([a-z0-9_-][ a-z0-9_-]*):( .+)","i"),single_key_value:new RegExp("^([a-z0-9_-][ a-z0-9_-]*):( .+?)$","i"),key:new RegExp("([a-z0-9_-][ a-z0-9_-]+):( .+)?","i"),item:new RegExp("^-\\s+"),trim:new RegExp("^\\s+|\\s+$"),comment:new RegExp("([^\\'\\\"#]+([\\'\\\"][^\\'\\\"]*[\\'\\\"])*)*(#.*)?")};function i(e){return{parent:null,length:0,level:e,lines:[],children:[],addChild:function(e){this.children.push(e),e.parent=this,++this.length}}}function l(e){var n=null;if("true"==(e=e.replace(r.trim,"")))return!0;if("false"==e)return!1;if(".NaN"==e)return Number.NaN;if("null"==e)return null;if(".inf"==e)return Number.POSITIVE_INFINITY;if("-.inf"==e)return Number.NEGATIVE_INFINITY;if(n=e.match(r.dashesString))return n[1];if(n=e.match(r.quotesString))return n[1];if(n=e.match(r.float))return parseFloat(n[0]);if(n=e.match(r.integer))return parseInt(n[0]);if(isNaN(n=Date.parse(e))){if(n=e.match(r.single_key_value)){return(u={})[n[1]]=l(n[2]),u}if(n=e.match(r.array)){for(var t=0,i=" ",u=[],a="",s=!1,f=0,h=n[1].length;f<h;++f){if("'"==(i=n[1][f])||'"'==i){if(!1===s){s=i,a+=i;continue}if("'"==i&&"'"==s||'"'==i&&'"'==s){s=!1,a+=i;continue}}else if(!1!==s||"["!=i&&"{"!=i)if(!1!==s||"]"!=i&&"}"!=i){if(!1===s&&0==t&&","==i){u.push(l(a)),a="";continue}}else--t;else++t;a+=i}return a.length>0&&u.push(l(a)),u}if(n=e.match(r.map)){for(t=0,i=" ",u=[],a="",s=!1,f=0,h=n[1].length;f<h;++f){if("'"==(i=n[1][f])||'"'==i){if(!1===s){s=i,a+=i;continue}if("'"==i&&"'"==s||'"'==i&&'"'==s){s=!1,a+=i;continue}}else if(!1!==s||"["!=i&&"{"!=i)if(!1!==s||"]"!=i&&"}"!=i){if(!1===s&&0==t&&","==i){u.push(a),a="";continue}}else--t;else++t;a+=i}a.length>0&&u.push(a);var o={};for(f=0,h=u.length;f<h;++f)(n=u[f].match(r.key_value))&&(o[n[1]]=l(n[2]));return o}return e}return new Date(n)}function u(e){for(var n=e.lines,t=e.children,r=[n.join(" ")],i=0,l=t.length;i<l;++i)r.push(u(t[i]));return r.join("\n")}function a(e){for(var n=e.lines,t=e.children,r=n.join("\n"),i=0,l=t.length;i<l;++i)r+=a(t[i]);return r}function s(t){return function t(i){for(var s=null,f={},h=null,o=null,c=null,p=-1,g=[],v=!0,d=0,m=i.length;d<m;++d)if(-1==p||p==i[d].level){g.push(d),p=i[d].level,h=i[d].lines,o=i[d].children,c=null;for(var w=0,E=h.length;w<E;++w){var x=h[w];if(s=x.match(r.key)){var y=s[1];if("-"==y[0]&&(y=y.replace(r.item,""),v&&(v=!1,void 0===f.length&&(f=[])),null!=c&&f.push(c),c={},v=!0),void 0!==s[2]){var b=s[2].replace(r.trim,"");if("&"==b[0]){var R=t(o);null!=c?c[y]=R:f[y]=R,n[b.substr(1)]=R}else if("|"==b[0])null!=c?c[y]=a(o.shift()):f[y]=a(o.shift());else if("*"==b[0]){var N=b.substr(1),_={};if(void 0===n[N])e.push("Reference '"+N+"' not found!");else{for(var $ in n[N])_[$]=n[N][$];null!=c?c[y]=_:f[y]=_}}else">"==b[0]?null!=c?c[y]=u(o.shift()):f[y]=u(o.shift()):null!=c?c[y]=l(b):f[y]=l(b)}else null!=c?c[y]=t(o):f[y]=t(o)}else{if(x.match(/^-\s*$/)){v&&(v=!1,void 0===f.length&&(f=[])),null!=c&&f.push(c),c={},v=!0;continue}if(s=x.match(/^-\s*(.*)/)){null!=c?c.push(l(s[1])):(v&&(v=!1,void 0===f.length&&(f=[])),f.push(l(s[1])));continue}}}null!=c&&(v&&(v=!1,void 0===f.length&&(f=[])),f.push(c))}for(d=g.length-1;d>=0;--d)i.splice.call(i,g[d],1);return f}(t.children)}function f(l){e=[],n=[],t=(new Date).getTime();var u=s(function(n){var t,l=r.regLevel,u=r.invalidLine,a=n.split("\n"),s=0,f=0,h=[],o=new i(-1),c=new i(0);o.addChild(c);var p=[],g="";h.push(c),p.push(s);for(var v=0,d=a.length;v<d;++v)if(!(g=a[v]).match(u)){if((s=(t=l.exec(g))?t[1].length:0)>f){var m=c;c=new i(s),m.addChild(c),h.push(c),p.push(s)}else if(s<f){for(var w=!1,E=p.length-1;E>=0;--E)if(p[E]==s){c=new i(s),h.push(c),p.push(s),null!=h[E].parent&&h[E].parent.addChild(c),w=!0;break}if(!w)return void e.push("Error: Invalid indentation at line "+v+": "+g)}c.lines.push(g.replace(r.trim,"")),f=s}return o}(function(e){var n,t=e.split("\n"),i=r.comment;for(var l in t)(n=t[l].match(i))&&void 0!==n[3]&&(t[l]=n[0].substr(0,n[0].length-n[3].length));return t.join("\n")}(l)));return t=(new Date).getTime()-t,u}var h=new RegExp("^(\\ufeff?(= yaml =|---)$([\\s\\S]*?)(?:\\2|\\.\\.\\.)$(?:\\n)?)","m");function o(e){var n=(e=e||"").split(/(\r?\n)/);return n[0]&&/= yaml =|---/.test(n[0])?function(e){var n=h.exec(e);if(!n)return{attributes:{},body:e};var t=n[n.length-1].replace(/^\s+|\s+$/g,""),r=f(t)||{},i=e.replace(n[0],"");return{attributes:r,body:i,frontmatter:t}}(e):{attributes:{},body:e}}$docsify.plugins=[].concat(function(e,n){e.beforeEach(function(e){var t=o(e),r=t.attributes,i=t.body;return Docsify.util.merge(n.config,r.config),i})},$docsify.plugins)}();

View file

@ -1,41 +0,0 @@
(function () {
// From https://github.com/egoist/vue-ga/blob/master/src/index.js
function appendScript () {
var script = document.createElement('script');
script.async = true;
script.src = 'https://www.google-analytics.com/analytics.js';
document.body.appendChild(script);
}
function init (id) {
appendScript();
window.ga =
window.ga ||
function () {
(window.ga.q = window.ga.q || []).push(arguments);
};
window.ga.l = Number(new Date());
window.ga('create', id, 'auto');
}
function collect () {
if (!window.ga) {
init($docsify.ga);
}
window.ga('set', 'page', location.hash);
window.ga('send', 'pageview');
}
var install = function (hook) {
if (!$docsify.ga) {
console.error('[Docsify] ga is required.');
return
}
hook.beforeEach(collect);
};
$docsify.plugins = [].concat(install, $docsify.plugins);
}());

View file

@ -1 +0,0 @@
!function(){function n(n){!function(){var n=document.createElement("script");n.async=!0,n.src="https://www.google-analytics.com/analytics.js",document.body.appendChild(n)}(),window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=Number(new Date),window.ga("create",n,"auto")}function o(){window.ga||n($docsify.ga),window.ga("set","page",location.hash),window.ga("send","pageview")}$docsify.plugins=[].concat(function(n){$docsify.ga?n.beforeEach(o):console.error("[Docsify] ga is required.")},$docsify.plugins)}();

View file

@ -1,20 +0,0 @@
(function () {
function install (hook, vm) {
var dom = Docsify.dom;
hook.mounted(function (_) {
var div = dom.create('div');
div.id = 'gitalk-container';
var main = dom.getNode('#main');
div.style = "width: " + (main.clientWidth) + "px; margin: 0 auto 20px;";
dom.appendTo(dom.find('.content'), div);
var script = dom.create('script');
var content = "gitalk.render('gitalk-container')";
script.textContent = content;
dom.appendTo(dom.body, script);
});
}
$docsify.plugins = [].concat(install, $docsify.plugins);
}());

View file

@ -1 +0,0 @@
!function(){$docsify.plugins=[].concat(function(n,t){var i=Docsify.dom;n.mounted(function(n){var t=i.create("div");t.id="gitalk-container";var e=i.getNode("#main");t.style="width: "+e.clientWidth+"px; margin: 0 auto 20px;",i.appendTo(i.find(".content"),t);var o=i.create("script");o.textContent="gitalk.render('gitalk-container')",i.appendTo(i.body,o)})},$docsify.plugins)}();

View file

@ -1,321 +0,0 @@
(function () {
var INDEXS = {};
var helper;
function escapeHtml (string) {
var entityMap = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
'/': '&#x2F;'
};
return String(string).replace(/[&<>"'\/]/g, function (s) { return entityMap[s]; })
}
function getAllPaths (router) {
var paths = [];
helper.dom.findAll('a:not([data-nosearch])').map(function (node) {
var href = node.href;
var originHref = node.getAttribute('href');
var path = router.parse(href).path;
if (
path &&
paths.indexOf(path) === -1 &&
!Docsify.util.isAbsolutePath(originHref)
) {
paths.push(path);
}
});
return paths
}
function saveData (maxAge) {
localStorage.setItem('docsify.search.expires', Date.now() + maxAge);
localStorage.setItem('docsify.search.index', JSON.stringify(INDEXS));
}
function genIndex (path, content, router, depth) {
if ( content === void 0 ) content = '';
var tokens = window.marked.lexer(content);
var slugify = window.Docsify.slugify;
var index = {};
var slug;
tokens.forEach(function (token) {
if (token.type === 'heading' && token.depth <= depth) {
slug = router.toURL(path, { id: slugify(token.text) });
index[slug] = { slug: slug, title: token.text, body: '' };
} else {
if (!slug) { return }
if (!index[slug]) {
index[slug] = { slug: slug, title: '', body: '' };
} else {
if (index[slug].body) {
index[slug].body += '\n' + (token.text || '');
} else {
index[slug].body = token.text;
}
}
}
});
slugify.clear();
return index
}
/**
* @param {String} query
* @returns {Array}
*/
function search (query) {
var matchingResults = [];
var data = [];
Object.keys(INDEXS).forEach(function (key) {
data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; }));
});
query = query.trim();
var keywords = query.split(/[\s\-\\\/]+/);
if (keywords.length !== 1) {
keywords = [].concat(query, keywords);
}
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) {
// From https://github.com/sindresorhus/escape-string-regexp
var regEx = new RegExp(
keyword.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'),
'gi'
);
var indexTitle = -1;
var indexContent = -1;
indexTitle = postTitle && postTitle.search(regEx);
indexContent = postContent && 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 =
'...' +
escapeHtml(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
}
function init$1 (config, vm) {
helper = Docsify;
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 paths = isAuto ? getAllPaths(vm.router) : config.paths;
var len = paths.length;
var count = 0;
paths.forEach(function (path) {
if (INDEXS[path]) { return count++ }
helper
.get(vm.router.getFile(path), false, vm.config.requestHeaders)
.then(function (result) {
INDEXS[path] = genIndex(path, result, vm.router, config.depth);
len === ++count && saveData(config.maxAge);
});
});
}
var NO_DATA_TEXT = '';
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 .input-wrap {\n display: flex;\n align-items: center;\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: 0 7px;\n line-height: 36px;\n font-size: 14px;\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\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}";
Docsify.dom.style(code);
}
function tpl (opts, defaultValue) {
if ( defaultValue === void 0 ) defaultValue = '';
var html =
"<div class=\"input-wrap\">\n <input type=\"search\" value=\"" + defaultValue + "\" />\n <div class=\"clear-button\">\n <svg width=\"26\" height=\"24\">\n <circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"#ccc\" />\n <path stroke=\"white\" stroke-width=\"2\" d=\"M8.25,8.25,15.75,15.75\" />\n <path stroke=\"white\" stroke-width=\"2\"d=\"M8.25,15.75,15.75,8.25\" />\n </svg>\n </div>\n </div>\n <div class=\"results-panel\"></div>\n </div>";
var el = Docsify.dom.create('div', html);
var aside = Docsify.dom.find('aside');
Docsify.dom.toggleClass(el, 'search');
Docsify.dom.before(aside, el);
}
function doSearch (value) {
var $search = Docsify.dom.find('div.search');
var $panel = Docsify.dom.find($search, '.results-panel');
var $clearBtn = Docsify.dom.find($search, '.clear-button');
if (!value) {
$panel.classList.remove('show');
$clearBtn.classList.remove('show');
$panel.innerHTML = '';
return
}
var matchs = search(value);
var html = '';
matchs.forEach(function (post) {
html += "<div class=\"matching-post\">\n<a href=\"" + (post.url) + "\">\n<h2>" + (post.title) + "</h2>\n<p>" + (post.content) + "</p>\n</a>\n</div>";
});
$panel.classList.add('show');
$clearBtn.classList.add('show');
$panel.innerHTML = html || ("<p class=\"empty\">" + NO_DATA_TEXT + "</p>");
}
function bindEvents () {
var $search = Docsify.dom.find('div.search');
var $input = Docsify.dom.find($search, 'input');
var $inputWrap = Docsify.dom.find($search, '.input-wrap');
var timeId;
// Prevent to Fold sidebar
Docsify.dom.on(
$search,
'click',
function (e) { return e.target.tagName !== 'A' && e.stopPropagation(); }
);
Docsify.dom.on($input, 'input', function (e) {
clearTimeout(timeId);
timeId = setTimeout(function (_) { return doSearch(e.target.value.trim()); }, 100);
});
Docsify.dom.on($inputWrap, 'click', function (e) {
// click input outside
if (e.target.tagName !== 'INPUT') {
$input.value = '';
doSearch();
}
});
}
function updatePlaceholder (text, path) {
var $input = Docsify.dom.getNode('.search input[type="search"]');
if (!$input) { return }
if (typeof text === 'string') {
$input.placeholder = text;
} else {
var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0];
$input.placeholder = text[match];
}
}
function updateNoData (text, path) {
if (typeof text === 'string') {
NO_DATA_TEXT = text;
} else {
var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0];
NO_DATA_TEXT = text[match];
}
}
function init (opts, vm) {
var keywords = vm.router.parse().query.s;
style();
tpl(opts, keywords);
bindEvents();
keywords && setTimeout(function (_) { return doSearch(keywords); }, 500);
}
function update (opts, vm) {
updatePlaceholder(opts.placeholder, vm.route.path);
updateNoData(opts.noData, vm.route.path);
}
var CONFIG = {
placeholder: 'Type to search',
noData: 'No Results!',
paths: 'auto',
depth: 2,
maxAge: 86400000 // 1 day
};
var install = function (hook, vm) {
var util = Docsify.util;
var opts = vm.config.search || CONFIG;
if (Array.isArray(opts)) {
CONFIG.paths = opts;
} else if (typeof opts === 'object') {
CONFIG.paths = Array.isArray(opts.paths) ? opts.paths : 'auto';
CONFIG.maxAge = util.isPrimitive(opts.maxAge) ? opts.maxAge : CONFIG.maxAge;
CONFIG.placeholder = opts.placeholder || CONFIG.placeholder;
CONFIG.noData = opts.noData || CONFIG.noData;
CONFIG.depth = opts.depth || CONFIG.depth;
}
var isAuto = CONFIG.paths === 'auto';
hook.mounted(function (_) {
init(CONFIG, vm);
!isAuto && init$1(CONFIG, vm);
});
hook.doneEach(function (_) {
update(CONFIG, vm);
isAuto && init$1(CONFIG, vm);
});
};
$docsify.plugins = [].concat(install, $docsify.plugins);
}());

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

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

File diff suppressed because one or more lines are too long

10431
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.6.3",
"version": "4.9.4",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
@ -11,9 +11,10 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/QingWei-Li/docsify.git"
"url": "git+https://github.com/docsifyjs/docsify.git"
},
"main": "lib/docsify.js",
"unpkg": "lib/docsify.min.js",
"files": [
"lib",
"src",
@ -21,42 +22,57 @@
],
"scripts": {
"bootstrap": "npm i && lerna bootstrap && npm run build:ssr",
"build": "rm -rf lib themes && node build/build && mkdir lib/themes && mkdir themes && node build/build-css && npm run build:ssr && node build/build-cover",
"dev:build": "rm -rf lib themes && mkdir themes && node build/build --dev && node build/build-css --dev",
"dev": "node app & nodemon -w src -e js,css --exec 'npm run dev:build'",
"build:ssr": "node build/build-ssr",
"test": "eslint {src,packages} --fix",
"pub:next": "RELEASE_TAG=next sh build/release.sh",
"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"
},
"dependencies": {
"marked": "^0.3.12",
"marked": "^0.5.1",
"medium-zoom": "^0.4.0",
"opencollective": "^1.0.3",
"medium-zoom": "^0.3.0",
"prismjs": "^1.9.0",
"prismjs": "^1.15.0",
"tinydate": "^1.0.0",
"tweezer.js": "^1.4.0"
},
"devDependencies": {
"autoprefixer-stylus": "^0.14.0",
"chai": "^4.2.0",
"chokidar": "^2.0.2",
"conventional-changelog-cli": "^1.3.5",
"cross-env": "^5.1.3",
"cssnano": "^3.10.0",
"eslint": "^4.14.0",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-vue": "^4.0.1",
"eslint-config-xo-space": "^0.18.0",
"esm": "^3.1.4",
"jsdom": "^13.2.0",
"lerna": "^2.5.1",
"nodemon": "^1.14.7",
"postcss": "^5.2.16",
"postcss-salad": "^1.0.8",
"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-string": "^2.0.2",
"rollup-plugin-uglify": "^2.0.1",
"serve-static": "^1.13.1"
"stylus": "^0.54.5"
},
"keywords": [
"doc",

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