Compare commits

..
34 Commits
Author SHA1 Message Date
qingwei.li 2c2ac5f461 -> v3.4.4 2017-03-17 17:12:47 +08:00
qingwei.li 1edcd63cdb bump: 3.4.4 2017-03-17 17:12:41 +08:00
qingwei.li 2d6a51b057 fix(search): fix input style 2017-03-17 17:11:46 +08:00
cinwell.liandGitHub bf1ae7802d Merge pull request #135 from xsdlr/master
fix search plugin match bug
2017-03-17 16:45:49 +08:00
xsdlr cf9b7c99e4 fix search plugin match bug 2017-03-16 18:29:02 +08:00
qingwei.li c20f3298d8 -> v3.4.3 2017-03-16 08:51:01 +08:00
qingwei.li dd7d9aa4ad bump: 3.4.3 2017-03-16 08:50:51 +08:00
qingwei.li bba957d3bc docs: add docsify-ignore 2017-03-16 08:48:21 +08:00
cinwell.liandGitHub 28b3cb4249 Merge pull request #133 from jrappen/master
fix erroneously removal of "themes" from files, fix #132
2017-03-16 07:06:26 +08:00
Johannes Rappen 97e730d7e3 fix erroneously removal of "themes" from files, fix QingWei-Li/docsify#132 2017-03-16 00:00:02 +01:00
cinwell.liandGitHub 65a6b3c659 Merge pull request #132 from jrappen/master
fix some minor issues
2017-03-16 06:37:26 +08:00
Johannes Rappen f6b827f7bc fix some links 2017-03-15 22:32:33 +01:00
Johannes Rappen 24d1b0feb6 use rem instead of em, fix QingWei-Li/docsify#116 2017-03-15 22:23:48 +01:00
Johannes Rappen 54da5fb6c8 update package.json
* remove "themes" from "files" as it is a subfolder of "src"
* reorder elements
* update dependencies
* update devDependencies
* make author a dictionary
2017-03-15 22:07:28 +01:00
Chris Anselmoandcinwell.li d57b80e224 Add ability to ignore headers when generating toc (#127)
* Added ability to ignore some or all headings when generating toc in sidebar

* Added documentation for ignoring sub headers

* Fixed minor test issues
2017-03-15 15:50:26 +08:00
cinwell.liandGitHub 788bbb36b4 Merge pull request #122 from Leopoldthecoder/master
fix external-script not inserting script at right place
2017-03-12 20:54:17 +08:00
Leopoldthecoder 92070e3099 fix external-script not inserting script at right place 2017-03-12 20:18:46 +08:00
qingwei.li de0ad0f04c docs(index.html): update languages 2017-03-12 08:44:52 +08:00
qingwei.li ceafc37bb3 docs(index.html): update config 2017-03-12 08:27:29 +08:00
cinwell.liandGitHub 1f19cb2ade Merge pull request #121 from jrappen/master
add German docs
2017-03-12 08:10:42 +08:00
Johannes Rappen 33393ef0f6 add German docs 2017-03-11 22:13:25 +01:00
qingwei.li 4ff8fb2c60 -> v3.4.2 2017-03-11 19:33:03 +08:00
qingwei.li 9b858fc4c4 bump: 3.4.2 2017-03-11 19:31:57 +08:00
qingwei.li 3aef37a445 feat(emojify): add no-emoji option 2017-03-11 19:30:38 +08:00
qingwei.li 37daa7ef9c docs(vue): fix typo 2017-03-11 18:27:43 +08:00
qingwei.li b0da9f23d3 docs(vue): fix typo 2017-03-11 18:16:34 +08:00
qingwei.li 1f66e61f63 -> v3.4.1 2017-03-10 12:02:32 +08:00
qingwei.li 5f07d5a9f3 bump: 3.4.1 2017-03-10 12:02:23 +08:00
qingwei.li d1d8f88a1a add changelog 2017-03-10 12:00:47 +08:00
qingwei.li b9a7275c8f fix(dom): Disable the dom cache when vue is present, fixed #119 2017-03-10 11:58:27 +08:00
cinwell.liandGitHub 0fddd1ced4 Merge pull request #118 from jrappen/master
Update English docs and sort css
2017-03-10 11:57:59 +08:00
Johannes Rappen 262bf13964 order css source alphabetically 2017-03-09 22:22:35 +01:00
Johannes Rappen 0b1fc2343f update main markdown files 2017-03-09 22:19:57 +01:00
Johannes Rappen 6eada5a2f7 update english docs 2017-03-09 22:19:07 +01:00
71 changed files with 2135 additions and 590 deletions
+5
View File
@@ -0,0 +1,5 @@
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.
+67 -59
View File
@@ -1,86 +1,94 @@
3.4.0 / 2017-03-09
==================
# 3.4.4 / 2017-03-17
* feat(zoom-image): add plugin
* fix(search): fix input style
* fix search plugin match bug
3.3.0 / 2017-03-07
==================
# 3.4.3 / 2017-03-16
* add front-matter plugin
* add external-script plugin
* Fix nav showing while loading (#112)
* Fix a typo (#111)
* Update changelog
* Add ability to ignore headers when generating toc ([#127](https://github.com/QingWei-Li/docsify/issues/127) [@christopherwk210](https://github.com/christopherwk210))
* fix external-script not inserting script at right place [@Leopoldthecoder](https://github.com/Leopoldthecoder)
* add German docs [@jrappen](https://github.com/jrappen)
3.2.0 / 2017-02-28
==================
# 3.4.2 / 2017-03-11
* fix(render): Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106)
* feat(search): Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103)
* fix(fetch): load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100)
* feat(render) nameLink for each route, fixed [#99](https://github.com/QingWei-Li/docsify/issues/99)
* feat(emojify): add no-emoji option
3.1.2 / 2017-02-27
==================
# 3.4.1 / 2017-03-10
* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102)
* fix(dom): Disable the dom cache when vue is present, fixed [#119](https://github.com/QingWei-Li/docsify/issues/119)
* update english docs, [@jrappen](https://github.com/jrappen)
3.1.1 / 2017-02-24
==================
# 3.4.0 / 2017-03-09
* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102)
* fix(render): custom cover background image
* fix(tpl): extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101)
* feat(zoom-image): add plugin
3.1.0 / 2017-02-22
==================
# 3.3.0 / 2017-03-07
* fix(search): incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90)
* feat(emoji): add emoji plugin
* add front-matter plugin
* add external-script plugin, [@Leopoldthecoder](https://github.com/Leopoldthecoder)
* Fix nav showing while loading ([#112](https://github.com/QingWei-Li/docsify/issues/112))
3.0.5 / 2017-02-21
==================
# 3.2.0 / 2017-02-28
* feat(pwa): add sw.js
* fix(layout.css): loading style
* fix(event): highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86)
* fix(gen-tree): cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88)
* fix(render): Toc rendering error, fixed [#106](https://github.com/QingWei-Li/docsify/issues/106)
* feat(search): Localization for no data tip, close [#103](https://github.com/QingWei-Li/docsify/issues/103)
* fix(fetch): load sidebar and navbar for parent path, fixed [#100](https://github.com/QingWei-Li/docsify/issues/100)
* feat(render) nameLink for each route, fixed [#99](https://github.com/QingWei-Li/docsify/issues/99)
3.0.4 / 2017-02-20
==================
# 3.1.2 / 2017-02-27
* fix(render): execute script
* fix(render): disable rendering sub list when loadSidebar is false
* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102)
3.0.3 / 2017-02-19
==================
# 3.1.1 / 2017-02-24
* fixed look of links in blockquote
* fix(scroll) highlight bug
* fix(search): dont search nameLink, fixed [#102](https://github.com/QingWei-Li/docsify/issues/102)
* fix(render): custom cover background image
* fix(tpl): extra character, fixed [#101](https://github.com/QingWei-Li/docsify/issues/101)
3.0.2 / 2017-02-19
==================
# 3.1.0 / 2017-02-22
* fix(search): add lazy input
* fix(compiler): link
* fix(search): incorrect anchor link, fixed [#90](https://github.com/QingWei-Li/docsify/issues/90)
* feat(emoji): add emoji plugin
3.0.1 / 2017-02-19
==================
# 3.0.5 / 2017-02-21
* fix(route): empty alias
* feat(pwa): add sw.js
* fix(layout.css): loading style
* fix(event): highlight sidebar when clicked, fixed [#86](https://github.com/QingWei-Li/docsify/issues/86)
* fix(gen-tree): cache toc list, fixed [#88](https://github.com/QingWei-Li/docsify/issues/88)
3.0.0 / 2017-02-19
==================
# 3.0.4 / 2017-02-20
* fix(render): execute script
* fix(render): disable rendering sub list when loadSidebar is false
# 3.0.3 / 2017-02-19
* fixed look of links in blockquote
* fix(scroll) highlight bug
# 3.0.2 / 2017-02-19
* fix(search): add lazy input
* fix(compiler): link
# 3.0.1 / 2017-02-19
* fix(route): empty alias
# 3.0.0 / 2017-02-19
#### Breaking change
- Not support IE9
- The route becomes: `/#/page?id=slug`. The previous route will be redirected
* Not support IE9
* The route becomes: `/#/page?id=slug`. The previous route will be redirected
#### Features
- Faster rendering
- Clearer source code
- More powerful API
- Auto header for each page [#78](https://github.com/QingWei-Li/docsify/issues/78)
- Localization for search plugin [#80](https://github.com/QingWei-Li/docsify/issues/80)
- Execute the script in markdown (see `executeScript`)
* Faster rendering
* Clearer source code
* More powerful API
* Auto header for each page [#78](https://github.com/QingWei-Li/docsify/issues/78)
* Localization for search plugin [#80](https://github.com/QingWei-Li/docsify/issues/80)
* Execute the script in markdown (see `executeScript`)
+247 -121
View File
@@ -3,22 +3,24 @@
> 2017-02-15
#### Bug fixes
* fix emoji replacing error (#76)
* fix emoji replacing error ([#76](https://github.com/QingWei-Li/docsify/issues/76))
### 2.4.2
> 2017-02-14
#### Bug fixes
- fix(index): load file path error
* fix(index): load file path error
### 2.4.1
> 2017-02-13
#### Bug fixes
- fix(index): cover page
* fix(index): cover page
### 2.4.0
@@ -26,8 +28,7 @@
#### Features
- feat(hook): add `doneEach`
* feat(hook): add `doneEach`
### 2.3.0
@@ -35,352 +36,477 @@
#### Features
- feat(src): add alias feature
- docs: update all documents
- feat(src): dynamic title
- feat(hook): support custom plugin
- feat(themes): add dark theme
* feat(src): add alias feature
* docs: update all documents
* feat(src): dynamic title
* feat(hook): support custom plugin
* feat(themes): add dark theme
#### Bug fixes
- fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67
- fix: sidebar style
- fix(render): fix render link
* fix(event): `auto2top` has no effect on a FF mobile browser, fixed #67
* fix: sidebar style
* fix(render): fix render link
### 2.2.1
> 2017-02-11
#### Bug fixes
- fix(search): crash when not content, fixed #68
- fix(event): scroll active sidebar
- fix(search): not work in mobile
* fix(search): crash when not content, fixed [#68](https://github.com/QingWei-Li/docsify/issues/68)
* fix(event): scroll active sidebar
* fix(search): not work in mobile
### 2.2.0
#### Features
- Add `Google Analytics` plugin.
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
* Add `Google Analytics` plugin.
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
```
### 2.1.0
#### Features
- Add search plugin
```html
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
* Add search plugin
```html
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
```
#### Bug fixes
- fix sidebar style
* fix sidebar style
### 2.0.3
#### Bug fixes
- fix: rendering emojis
- fix: css var polyfill
* fix: rendering emojis
* fix: css var polyfill
### 2.0.2
#### Bug fixes
- fix button style in cover page.
* fix button style in cover page.
### 2.0.1
#### Bug fixes
- border style.
* border style.
### 2.0.0
#### Features
- Customize the theme color
* Customize the theme color
#### Break change
- Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs
* Remove `data-router`, `data-sidebar`, `data-sidebar-toggle` APIs
### 1.10.5
#### Bug fixes
- fix initialize the Vue instance
* fix initialize the Vue instance
### 1.10.4
#### Bug fixes
- fix execute script
* fix execute script
### 1.10.3
#### Bug fixes
- compatible vuep QingWei-Li/vuep/issues/2
- fix sidebar scroll, fixed #63
* compatible vuep ([#2](https://github.com/QingWei-Li/vuep/issues/2))
* fix sidebar scroll, fixed [#63](https://github.com/QingWei-Li/docsify/issues/63)
### 1.10.2
#### Bug fixes
- Fix render emojis again
* Fix render emojis again
### 1.10.1
#### Bug fixes
- Fix render emojis
* Fix render emojis
### 1.10.0
#### Features
- Support emoji :laughing:
* Support emoji :laughing:
### 1.9.0
#### Bug fixes
- Destroys the vue instance when the route is changed
* Destroys the vue instance when the route is changed
#### Features
- Add `!>` and `?>` doc helper.
* Add `!>` and `?>` doc helper.
#### Break change
- Remove `!` doc helper.
* Remove `!` doc helper.
### 1.8.0
#### Bug fixes
- Using `v-pre` skip compilation.
* Using `v-pre` skip compilation.
### Features
- Execute script when vue exists.
* Execute script when vue exists.
### 1.7.4
#### Bug fixes
- Fix bugs caused by the previous version
* Fix bugs caused by the previous version
### 1.7.3
#### Bug fixes
- Add `hr` style
- Fixed option is an empty string
* Add `hr` style
* Fixed option is an empty string
### 1.7.2
#### Bug fixes
- Fix sidebar click event in mobile browser.
* Fix sidebar click event in mobile browser.
### 1.7.1
#### Bug fixes
- Fix sidebar style in mobile browser.
* Fix sidebar style in mobile browser.
### 1.7.0
#### Bug fixes
- Fixed custom cover background, fixed #52
- Fixed sticky sidebar
* Fixed custom cover background, fixed [#52](https://github.com/QingWei-Li/docsify/issues/52)
* Fixed sticky sidebar
### Features
- Add `name` and `nameLink`
* Add `name` and `nameLink`
### 1.6.1
#### Bug fixes
- Fixed sidebar bug when the coverpage exist
* Fixed sidebar bug when the coverpage exist
### 1.6.0
#### Features
- Improve sidebar performance. The active item is automatically scrolled in the visible view.
- New doc helper: `! `. e.g. `! content` will be rendered as `<p class="tip">content</p>`
* Improve sidebar performance. The active item is automatically scrolled in the visible view.
* New doc helper: `! `. e.g. `! content` will be rendered as `<p class="tip">content</p>`
### 1.5.2
#### Bug fixes
- Fixed number at the beginning of the slug
* Fixed number at the beginning of the slug
### 1.5.1
#### Bug fixes
- Remove HTML tag when handling slug
* Remove HTML tag when handling slug
### 1.5.0
#### Bug fixes
- Fix slugify.
- Fix nav highlight.
* Fix slugify.
* Fix nav highlight.
#### Features
- Initialize the configuration by `window.$docsify`.
- Markdown parser is configurable.
* Initialize the configuration by `window.$docsify`.
* Markdown parser is configurable.
### 1.4.3
#### Bug fixes
- Tweak style.
* Tweak style.
### 1.4.2
#### Bug fixes
- Fix toggle button style.
- Support `mailto`, `tel`, etc. href type
- Fix scroll to top.
* Fix toggle button style.
* Support `mailto`, `tel`, etc. href type
* Fix scroll to top.
### 1.4.1
#### Bug fixes
- Fix generate slug.
* Fix generate slug.
### 1.4.0 Happly new year 🎉
#### Features
- Display TOC in the custom sidebar, `data-sub-max-level`.
- Custom background in coverpage.
* Display TOC in the custom sidebar, `data-sub-max-level`.
* Custom background in coverpage.
#### Bug fixes
- Fix scroll highlight when Vue exist.
* Fix scroll highlight when Vue exist.
### 1.3.5
#### Bug fixes
- Fix vue
* Fix vue
### 1.3.4
#### Bug fixes
- Supports [vuep](https://github.com/QingWei-Li/vuep)
* Supports [vuep](https://github.com/QingWei-Li/vuep)
### 1.3.3
#### Bug fixes
- Fixed cover rendering timing
* Fixed cover rendering timing
### 1.3.2
#### Bug fixes
- Fixed render link
* Fixed render link
### 1.3.1
#### Bug fixes
- Fixed cover page style
- Generate the correct link when rendering the article
* Fixed cover page style
* Generate the correct link when rendering the article
### 1.3.0
#### Features
- Add cover page
- add `<kbd>` style
- headling can be cliked
* Add cover page
* add `<kbd>` style
* headling can be cliked
#### Bug fixes
- sidebar highlight
* sidebar highlight
#### break change
- Navbar no longer fixed at the top
* Navbar no longer fixed at the top
### 1.2.0
#### Features
- custom basePath
- custom homepage
* custom basePath
* custom homepage
### 1.1.7
#### Bug fixes
- Optimize progress bar
* Optimize progress bar
### 1.1.6
#### Features
- Add logo 😂
* Add logo 😂
#### Bug fixes
- Remove table background color
- Fixed highlight sidebar using chinese ids
* Remove table background color
* Fixed highlight sidebar using chinese ids
### 1.1.5
#### Features
- Add table style
#### Bug fixes
- Not fixed position of hte navbar in the mobile browser
- Correct calculation of whether the mobile browser
* Not fixed position of hte navbar in the mobile browser
* Correct calculation of whether the mobile browser
### 1.1.4
#### Bug fixes
- Fixed chinese auchor link
* Fixed chinese auchor link
### 1.1.3
#### Bug fixes
- Optimize progress bar again
* Optimize progress bar again
### 1.1.2
#### Bug fixes
- fix failed `auto2top` in mobile
* fix failed `auto2top` in mobile
### 1.1.1
#### Bug fixes
- Optimize progress bar
### 1.1.0
#### Features
- Add progress bar
- Add `auto2top` option for hash router
* Add progress bar
* Add `auto2top` option for hash router
### 1.0.3
#### Bug fixes
- Fix cache
### 1.0.2
#### Bug fixes
- Fix binding events bug, fixed #24
- Fix regular expression, fixed #23
* Fix binding events bug, fixed [#24](https://github.com/QingWei-Li/docsify/issues/24)
* Fix regular expression, fixed [#23](https://github.com/QingWei-Li/docsify/issues/23)
### 1.0.1
#### Bug fixes
- `img` style
* `img` style
### 1.0.0
#### Features
- Support hash router
* Support hash router
#### Bug fixes
- Improved scrolling on mobile
* Improved scrolling on mobile
### 0.7.0
#### Breaking change
- `themes/` was removed, only exists in the npm package.
* `themes/` was removed, only exists in the npm package.
#### Bug fixes
- Fix style.
- Fix sidebar animation again.
* Fix style.
* Fix sidebar animation again.
### 0.6.1
#### Bug fixes
- In the mobile, it should collapse the sidebar when toggle is clicked.
- Fix the dropdown list style.
- Fix sidebar animation.
* In the mobile, it should collapse the sidebar when toggle is clicked.
* Fix the dropdown list style.
* Fix sidebar animation.
### 0.6.0
#### Features
- Navbar support dropdown list, #6
- Sidebar with toggle
* Navbar support dropdown list, [#6](https://github.com/QingWei-Li/docsify/issues/6)
* Sidebar with toggle
#### Bug fixes
- Fix ineffective option, fixed #10
* Fix ineffective option, fixed [#10](https://github.com/QingWei-Li/docsify/issues/10)
### 0.5.0
#### Features
- Custom sidebars and navbars by markdown file
* Custom sidebars and navbars by markdown file
### 0.4.2
#### Bug fixes
- Correct catch ajax error
* Correct catch ajax error
### 0.4.1
#### Bug fixes
- catch ajax error
* catch ajax error
### 0.4.0
#### Features
- Custom sidebar
* Custom sidebar
#### Bug fixes
- Fix undefined language
* Fix undefined language
### 0.3.1
#### Bug fixes
- Strip HTML tag when rendering the headings
* Strip HTML tag when rendering the headings
### 0.3.0
#### Features
- Add minified css files
- Add max level option
- Add pure.css
* Add minified css files
* Add max level option
* Add pure.css
### 0.2.1
#### Bug fixes
- Fix vue.css
* Fix vue.css
### 0.2.0
#### Bug fixes
- Fix route
- Remove dynamic title
* Fix route
* Remove dynamic title
### 0.1.0
#### Features
- Add buble.css
* Add buble.css
+21 -12
View File
@@ -9,12 +9,13 @@
</p>
<p align="center">
<a href="https://travis-ci.org/QingWei-Li/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square"></a>
<a href="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://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>
</p>
## Links
- [Documentation](https://docsify.js.org)
- [CLI](https://github.com/QingWei-Li/docsify-cli)
@@ -28,7 +29,8 @@
- Compatible with IE10+
## Quick start
Create a `index.html`.
Create an `index.html`.
```html
<!-- index.html -->
@@ -37,12 +39,12 @@ Create a `index.html`.
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</html>
```
@@ -51,18 +53,24 @@ Create a `index.html`.
Modern browsers and Internet Explorer 10+.
## Showcase
These open-source projects are using docsify to generate their sites. Pull requests welcome :blush:
- [Snipaste](https://docs.snipaste.com/) - Snip & Paste
- [puck](https://puck.zz173.com/) - A small & magical php framework.
- [Samaritan](http://samaritan.stockdb.org) - An Algorithmic Trading Framework for Digital Currency.
- [Vudash](http://vudash.github.io/vudash/) - Powerful, Flexible, Open Source dashboards for anything
- [Trilogy](http://trilogy.js.org) - No-hassle SQLite with a Promise-based, document store style API.
- [Mybatis-Plus](http://mp.baomidou.com/) - An enhanced toolkit of Mybatis to simplify development
| Project | Description |
|---|---|
| [Snipaste](https://docs.snipaste.com/) | Snip & Paste |
| [puck](https://puck.zz173.com/) | A small & magical php framework. |
| [Samaritan](http://samaritan.stockdb.org) | An Algorithmic Trading Framework for Digital Currency. |
| [Vudash](http://vudash.github.io/vudash/) | Powerful, Flexible, Open Source dashboards for anything |
| [Trilogy](http://trilogy.js.org) | No-hassle SQLite with a Promise-based, document store style API. |
| [Mybatis-Plus](http://mp.baomidou.com/) | An enhanced toolkit of Mybatis to simplify development |
## Similar projects
- [docute](https://github.com/egoist/docute) - 📜 Effortlessly documentation done right
- [docpress](https://github.com/docpress/docpress) - Documentation website generator
| Project | Description |
|---|---|
| [docute](https://github.com/egoist/docute) | 📜 Effortlessly documentation done right |
| [docpress](https://github.com/docpress/docpress) | Documentation website generator |
## Contributing
@@ -81,4 +89,5 @@ open http://localhost:3000
```
## License
MIT
+7 -4
View File
@@ -7,20 +7,23 @@
<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>
<nav data-cloak>
<a href="#/">EN</a>
<a href="#/zh-cn/">中文</a>
</nav>
<div id="app"></div>
</body>
<script>
window.$docsify = {
alias: {
'/de-de/changelog': '/changelog',
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
},
loadNavbar: true,
executeScript: true
}
</script>
+7 -7
View File
@@ -10,13 +10,13 @@ See the [Quick start](/quickstart) for more details.
## Features
- No statically built html files
- Simple and lightweight (~16kB gzipped)
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
- Emoji support
- Compatible with IE10+
* No statically built html files
* Simple and lightweight (~16kB gzipped)
* Smart full-text search plugin
* Multiple themes
* Useful plugin API
* Emoji support
* Compatible with IE10+
## Examples
+4
View File
@@ -0,0 +1,4 @@
- :uk:
- [:cn: 中文](/zh-cn/)
- [:de: German](/de-de/)
- [:uk: English](/)
+10 -10
View File
@@ -1,8 +1,8 @@
- Getting started
- [Quick start](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
- [Quick start](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
- Customization
- [Configuration](/configuration)
@@ -13,10 +13,10 @@
- [Language highlighting](/language-highlight)
- Guide
- [Deploy](/deploy)
- [Helpers](/helpers)
- [Vue compatibility](/vue)
- [CDN](/cdn)
- [Offline Mode(PWA)](/pwa)
- [Deploy](/deploy)
- [Helpers](/helpers)
- [Vue compatibility](/vue)
- [CDN](/cdn)
- [Offline Mode(PWA)](/pwa)
- [Changelog](/changelog)
- [Changelog](/changelog)
+10 -5
View File
@@ -2,10 +2,8 @@
Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [unpkg.com/docsify/](//unpkg.com/docsify/).
## Latest version
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
@@ -14,8 +12,9 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon
<script src="//unpkg.com/docsify/lib/docsify.js"></script>
```
## Specific version
Alternatively, use [compressed files](#compressed-files).
## Specific version
```html
<!-- load css -->
@@ -27,7 +26,6 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon
## Compressed file
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
@@ -36,7 +34,14 @@ Recommended: [unpkg](//unpkg.com), which will reflect the latest version as soon
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```html
<!-- load css -->
<link rel="stylesheet" href="//unpkg.com/docsify@2.0.0/lib/themes/vue.css">
<!-- load script -->
<script src="//unpkg.com/docsify@2.0.0/lib/docsify.min.js"></script>
```
## Other CDN
[jsDelivr](http://www.jsdelivr.com/projects/docsify) is available.
+17 -19
View File
@@ -1,6 +1,6 @@
# Configuration
docsify supports two ways to configure. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes.
**docsify** supports two different ways of configuration. You can configure the `window.$docsify` or write configuration on the script tag via `data-*` attributes.
```html
<!-- by $docsify -->
@@ -53,7 +53,6 @@ window.$docsify = {
}
```
## max-level
- Type: `Number`
@@ -72,7 +71,7 @@ window.$docsify = {
- Type: `Boolean|String`
- Default: `false`
Load navbar from Markdown file. If **true** it will be loaded from `_navbar.md`.
Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
@@ -89,8 +88,7 @@ window.$docsify = {
- Type: `Boolean|String`
- Default: `false`
Load sidebar from Markdown file. If **true** it will be loaded from `_sidebar.md`.
Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
```js
window.$docsify = {
@@ -107,7 +105,7 @@ window.$docsify = {
- Type: `Number`
- Default: `0`
Add TOC in custom sidebar.
Add table of contents (TOC) in custom sidebar.
```js
window.$docsify = {
@@ -115,13 +113,11 @@ window.$docsify = {
}
```
## auto2top
- Type: `Boolean`
- Default: `false`
Scrolls to the top of the screen when the route is changed.
```js
@@ -130,13 +126,11 @@ window.$docsify = {
}
```
## homepage
- Type: `String`
- Default: `README.md`
`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
```js
@@ -167,7 +161,6 @@ window.$docsify = {
}
```
## coverpage
- Type: `Boolean|String`
@@ -188,8 +181,7 @@ window.$docsify = {
- Type: `String`
Website name appears in the sidebar.
Website name as it appears in the sidebar.
```js
window.$docsify = {
@@ -222,7 +214,6 @@ window.$docsify = {
See [Markdown configuration](/markdown).
```js
window.$docsify = {
// object
@@ -247,8 +238,7 @@ window.$docsify = {
- 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.
Customize the theme color. Use [CSS3 variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) feature and polyfill in old browser.
```js
window.$docsify = {
@@ -260,7 +250,6 @@ window.$docsify = {
- Type: `Object`
Set the route alias. You can freely manage routing rules.
```js
@@ -276,7 +265,7 @@ window.$docsify = {
- 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. [#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/QingWei-Li/docsify/issues/78).
```js
window.$docsify = {
@@ -303,7 +292,16 @@ window.$docsify = {
<script>
console.log(2333)
</script>
```
Note that if you are running an external script, e.g. an embedded jsfiddle demo, make sure to include the [external-script](plugins?id=external-script) plugin.
## no-emoji
Disabled emoji parse.
```js
window.$docsify = {
noEmoji: true
}
```
+7 -8
View File
@@ -1,6 +1,6 @@
# Cover
Activate the cover feature by setting `coverpage` to **true**. Details are available in the [coverpage configuration paragraph](configuration#coverpage).
Activate the cover feature by setting `coverpage` to **true**, compare [coverpage configuration](configuration#coverpage).
## Basic usage
@@ -14,16 +14,15 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
coverpage: true
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```markdown
<!-- _coverpage.md -->
![logo](_media/icon.svg)
# docsify <small>3.0</small>
# docsify <small>3.5</small>
> A magical documentation site generator.
@@ -31,27 +30,27 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
- No statically built html files
- Multiple themes
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#docsify)
```
!> A document site can have only one cover page.
!> A document site can have only one coverpage!
## Custom background
The background color is generated randomly by default. You can customize the background color or image:
The background color is generated randomly by default. You can customize the background color or a background image:
```markdown
<!-- _coverpage.md -->
# docsify
# docsify <small>3.5</small>
[GitHub](https://github.com/QingWei-Li/docsify/)
[Get Started](#quick-start)
<!-- background image -->
![](_media/bg.png)
<!-- background color -->
![color](#f0f0f0)
```
+32 -8
View File
@@ -2,7 +2,9 @@
## HTML
If you need custom navigation, you can create a HTML-based navigation bar (but note that documentation links begin with `#/`).
If you need custom navigation, you can create a HTML-based navigation bar.
!> Note that documentation links begin with `#/`.
```html
<!-- index.html -->
@@ -18,7 +20,7 @@ If you need custom navigation, you can create a HTML-based navigation bar (but n
## Markdown
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`. Details are available in the [load-navbar configuration paragraph](configuration#load-navbar).
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [load-navbar configuration](configuration#load-navbar).
```html
<!-- index.html -->
@@ -28,10 +30,9 @@ Alternatively, you can create a custom markdown-based navigation file by setting
loadNavbar: true
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
```markdown
<!-- _navbar.md -->
@@ -51,10 +52,10 @@ You can create sub-lists by indenting items that are under a certain parent.
<!-- _navbar.md -->
- Getting started
- [Quick start](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
- [Quick start](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
- Configuration
- [Configuration](/configuration)
@@ -68,4 +69,27 @@ renders as
![Nesting navbar](_images/nested-navbar.png "Nesting navbar")
## Combining custom navbars with the emoji plugin
If you use the [emoji plugin](plugins#emoji):
```html
<!-- index.html -->
<script>
window.$docsify = {
// ...
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
```
you could, for example, use flag emojis in your custom navbar Markdown file:
```markdown
<!-- _navbar.md -->
- [:us:, :uk:](/)
- [:cn:](/zh-cn/)
```
+27
View File
@@ -0,0 +1,27 @@
## 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).
Siehe [Schnellstart](/de-de/quickstart) für weitere Informationen.
## Features
* keine generierten, statischen HTML Dateien
* einfach und klein (~16kB gzipped)
* smarte Erweiterung mit Volltextsuche
* mehrere Themes
* praktische API für Erweiterungen
* Unterstützung für Emoji
* Kompatibel mit IE10+
## 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:
+4
View File
@@ -0,0 +1,4 @@
- :de:
- [:cn: 中文](/zh-cn/)
- [:de: German](/de-de/)
- [:uk: English](/)
+22
View File
@@ -0,0 +1,22 @@
- Loslegen
- [Schnellstart](/de-de/quickstart)
- [Schreiben weiterer Seiten](/de-de/more-pages)
- [Navigationsleiste anpassen](/de-de/custom-navbar)
- [Titelseite](/de-de/cover)
- Anpassen
- [Einstellungen](/de-de/configuration)
- [Themen](/de-de/themes)
- [Liste der Erweiterungen](/de-de/plugins)
- [Schreiben eigener Erweiterungen](/de-de/write-a-plugin)
- [Markdown-Einstellungen](/de-de/markdown)
- [Hervorheben von Sprachen](/de-de/language-highlight)
- Guide
- [Inbetriebnahme](/de-de/deploy)
- [Helfer](/de-de/helpers)
- [Vue Kompatibilität](/de-de/vue)
- [CDN](/de-de/cdn)
- [Offline Modus (PWA)](/de-de/pwa)
- [Changelog](/de-de/changelog)
+47
View File
@@ -0,0 +1,47 @@
# 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
[jsDelivr](http://www.jsdelivr.com/projects/docsify) ist auch verfügbar.
+307
View File
@@ -0,0 +1,307 @@
# Einstellungen
**docsify** unterstützt zwei verschiedene Arten, um die Einstellungen anzupassen. Du kannst das `window.$docsify` anpassen, oder die Einstellungen über das script tag im `data-*` Attribut vornehmen.
```html
<!-- über $docsify -->
<script>
window.$docsify = {
repo: 'QingWei-Li/docsify',
maxLevel: 3,
coverpage: true
}
</script>
<!-- oder data-* -->
<script
src="//unpkg.com/docsify"
data-repo="QingWei-Li/docsify"
data-max-level="3"
data-coverpage>
</script>
```
Beide Arten sind miteinander kompatibel, wobei die erste jedoch empfohlen wird. Sie ist deutlicher und kann in einer separaten Datei geführt werden.
!> Innerhalb des `window.$docsfiy` sollten die Optionen mit camelCase geschrieben werden.
## 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/'
}
```
## max-level
- Typ: `Number`
- Standard: `6`
Maximale Anzahl der Inhaltsübersichtebenen.
```js
window.$docsify = {
maxLevel: 4
}
```
## load-navbar
- 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'
}
```
## load-sidebar
- 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'
}
```
## sub-max-level
- 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'
}
```
## base-path
- 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). Falls `true`, wird sie von `_coverpage.md` geladen.
```js
window.$docsify = {
coverpage: true,
// Anderer Dateiname
coverpage: 'cover.md'
}
```
## name
- Typ: `String`
Webseitenname, wie er in der Inhaltsübersicht in der Seitenleiste angezeigt wird.
```js
window.$docsify = {
name: 'docsify'
}
```
## name-link
- 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).
```js
window.$docsify = {
// Objekt
markdown: {
smartypants: true,
renderer: {
link: function() {
// ...
}
}
},
// Funktion
markdown: function (marked, renderer) {
// ...
return marked
}
}
```
## theme-color
- 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.
```js
window.$docsify = {
alias: {
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
}
}
```
## auto-header
- 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
}
```
## execute-script
- Typ: `Boolean`
Führe das Skript auf der Seite aus. Analysiere nur das erste script tag ([demo](/de-de/themes)). 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](plugins?id=external-script) plugin zu verwenden.
## no-emoji
Verhindere die Umwandlung in Emojis:
```js
window.$docsify = {
noEmoji: true
}
```
+56
View File
@@ -0,0 +1,56 @@
# Titelseite
Aktiviere die Unterstützung für Titelseiten, indem du `coverpage` auf **true** einstellst, vergleiche [coverpage Einstellungen](/de-de/configuration#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 (~16kB 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)
```
+95
View File
@@ -0,0 +1,95 @@
# 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 [load-navbar Einstellungen](/de-de/configuration#load-navbar).
```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](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
- Configuration
- [Configuration](/configuration)
- [Themes](/themes)
- [Using plugins](/plugins)
- [Markdown configuration](/markdown)
- [Language highlight](/language-highlight)
```
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](/de-de/plugins#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/)
```
+33
View File
@@ -0,0 +1,33 @@
# 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.
## VPS
Verwende folgende nginx config.
```nginx
server {
listen 80;
server_name your.domain.com;
location / {
alias /path/to/dir/of/docs;
index index.html;
}
}
```
+27
View File
@@ -0,0 +1,27 @@
# 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
+11
View File
@@ -0,0 +1,11 @@
# 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.
+30
View File
@@ -0,0 +1,30 @@
# 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
}
}
```
+92
View File
@@ -0,0 +1,92 @@
# 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](/de-de/configuration#load-sidebar).
```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](/guide)
```
!> 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.
## Inhaltsverzeichnis
Eine angepasste Seitenleist kann auch automatisch ein Inhaltsverzeichnis generieren, indem ein `subMaxLevel` gesetzt wird, vergleiche [sub-max-level Einstellungen](/de-de/configuration#sub-max-level).
```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.
+95
View File
@@ -0,0 +1,95 @@
# 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'
}
}
}
</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 [zoom-image](https://github.com/egoist/zoom-image).
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
```
+32
View File
@@ -1,3 +1,16 @@
# 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
* ===========================================================
@@ -81,3 +94,22 @@ self.addEventListener('fetch', event => {
)
}
})
```
## 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.
+87
View File
@@ -0,0 +1,87 @@
# 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) 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 charset="UTF-8">dict.
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</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](/de-de/configuration#el).
+56
View File
@@ -0,0 +1,56 @@
# 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>
+100
View File
@@ -0,0 +1,100 @@
# 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/).
+70
View File
@@ -0,0 +1,70 @@
# 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
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
})
}
]
}
```
+6 -6
View File
@@ -1,16 +1,16 @@
# Deploy
As as GitBook, you can deploy files to GitHub Pages or VPS.
Similar to [GitBook](https://www.gitbook.com), you can deploy files to GitHub Pages or VPS.
## GitHub Pages
There're three places to populate your docs
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
You can save your files in `./docs` and setting `master branch /docs folder`.
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)
+6 -5
View File
@@ -4,23 +4,24 @@ docsify extends Markdown syntax to make your documents more readable.
## important content
Suitable for displaying important information.
Important content like:
```markdown
!> **Time** is money, my friend!
```
!> **Time** is money, my friend!
is rendered as:
!> **Time** is money, my friend!
## General tips
General tips.
General tips like:
```markdown
?> *TODO* unit test
```
?> *TODO* unit test
are rendered as:
?> *TODO* unit test
+30 -18
View File
@@ -6,36 +6,48 @@
<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="google-site-verification" content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE" />
<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">
<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>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>
<body>
<nav data-cloak>
<a href="#/">En</a>
<a href="#/zh-cn/">中文</a>
</nav>
<div id="app"></div>
<div id="app">Loading ...</div>
</body>
<script>
window.$docsify = {
name: 'docsify',
maxLevel: 4,
subMaxLevel: 2,
auto2top: true,
coverpage: true,
loadSidebar: true,
executeScript: true,
alias: {
'/de-de/changelog': '/changelog',
'/zh-cn/changelog': '/changelog',
'/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
}
}
if (typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.register('sw.js')
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
maxLevel: 4,
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
subMaxLevel: 2
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
+5 -7
View File
@@ -1,13 +1,11 @@
# language highlight
The code language highlight tool is [Prism](https://github.com/PrismJS/prism). Only supports CSS, JavaScipt and HTML by default. You can load its component to highlight the language you need.
**docsify** uses [Prism](https://github.com/PrismJS/prism) to highlight code blocks in your pages. By default it only supports CSS, JavaScipt and HTML. You can make **Prism** load additional languages:
```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>
<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>
```
?> See fully supported highlight component [files list](https://github.com/PrismJS/prism/tree/gh-pages/components).
?> Check the [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) list for more options.
+1 -1
View File
@@ -1,6 +1,6 @@
# Markdown configuration
The Markdown parser is [marked](https://github.com/chjj/marked). You can customize how docsify renders your Markdown content to HTML. Support customize `renderer`.
**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`:
```js
window.$docsify = {
+25 -4
View File
@@ -16,7 +16,6 @@ For example, the directory structure is as follows:
Matching routes
```text
docs/README.md => http://domain.com
docs/guide.md => http://domain.com/guide
@@ -38,7 +37,7 @@ First, you need to set `loadSidebar` to **true**. Details are available in the [
loadSidebar: true
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Create the `_sidebar.md`:
@@ -56,7 +55,7 @@ Create the `_sidebar.md`:
## Table of Contents
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`. Details are available in the [max-level configuration paragraph](configuration#sub-max-level).
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [sub-max-level configuration](configuration#sub-max-level).
```html
<!-- index.html -->
@@ -67,5 +66,27 @@ A custom sidebar can also automatically generate a table of contents by setting
subMaxLevel: 2
}
</script>
<script src="//unpkg.com/docsify"></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.
+15 -12
View File
@@ -17,7 +17,7 @@ By default, the hyperlink on the current page is recognized and the content is s
'/zh-cn/', // => /zh-cn/README.md
],
// 完整配置参数
// complete configuration parameters
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
@@ -39,11 +39,10 @@ By default, the hyperlink on the current page is recognized and the content is s
}
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
```
## Google Analytics
Install the plugin and configure the track id.
@@ -54,25 +53,29 @@ Install the plugin and configure the track id.
ga: 'UA-XXXXX-Y'
}
</script>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
```
Configure by `data-ga`.
```html
<script src="//unpkg.com/docsify/lib/docsify.min.js" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
```
## front matter
```html
<script src="//unpkg.com/docsify" data-ga="UA-XXXXX-Y"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
<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.
```html
<script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
```
## External Script
@@ -80,7 +83,7 @@ The default is to support parsing emoji. For example `:100:` will be parsed to :
If the script on the page is an external one (imports a js file via `src` attribute), you'll need this plugin to make it work.
```html
<script src="//unpkg.com/docsify/lib/plugins/external-script.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/external-script.min.js"></script>
```
## Zoom image
@@ -88,5 +91,5 @@ If the script on the page is an external one (imports a js file via `src` attrib
Medium's Image Zoom. Based on [zoom-image](https://github.com/egoist/zoom-image).
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
```
+5 -3
View File
@@ -1,10 +1,12 @@
# Offline Mode
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/)(PWA) are experiences that combine the best of the web and the best of apps. we can enhance our website with service workers to work **offline** or on low-quality networks.
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) are experiences that combine the best of the web with the best of apps. We can enhance our website with service workers to work **offline** or on low-quality networks.
It is also very easy to use it.
## Create serviceWorker
Create a sw.js file in your documents root directory and copy this code.
Create a `sw.js` file in your documents root directory and copy the following code:
*sw.js*
@@ -96,7 +98,7 @@ self.addEventListener('fetch', event => {
## Register
Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge.
Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge:
*index.html*
+10 -10
View File
@@ -8,7 +8,7 @@ npm i docsify-cli -g
## Initialize
If you want to write the documentation in the `./docs` directory, you can use the `init` command.
If you want to write the documentation in the `./docs` subdirectory, you can use the `init` command.
```bash
docsify init ./docs
@@ -16,20 +16,18 @@ docsify init ./docs
## Writing content
After the init is complete, you can see the file list in the docs directory.
After the `init` is complete, you can see the file list in the `./docs` subdirectory.
* `index.html` as the entry file
* `README.md` as the home page
* `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
- `index.html` as the entry file
- `README.md` as the home page
- `.nojekyll` prevents GitHub Pages from ignoring files that begin with an underscore
You can easily update the documentation in `docs/README.md`, of course you can add [more pages](more-pages).
You can easily update the documentation in `./docs/README.md`, of course you can add [more pages](more-pages).
## Preview your site
Run the local server with `docsify serve`. You can preview your site in your browser on `http://localhost:3000`.
```bash
docsify serve docs
```
@@ -38,7 +36,7 @@ docsify serve docs
## Manual initialization
If you don't like npm or have trouble installing the tool, you can manually create `index.html`:
If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`:
```html
<!-- index.html -->
@@ -52,7 +50,7 @@ If you don't like npm or have trouble installing the tool, you can manually crea
<body>
<div id="app"></div>
</body>
<script src="//unpkg.com/docsify"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</html>
```
@@ -85,3 +83,5 @@ You should set the `data-app` attribute if you changed `el`:
}
</script>
```
Compare [el configuration](/configuration#el).
+17 -9
View File
@@ -2,35 +2,43 @@
There are currently three themes available. Copy [Vue](//vuejs.org) and [buble](//buble.surge.sh) website custom theme and [@liril-net](https://github.com/liril-net) contribution to the theme of the black style.
```html
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/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">
```
!> This compressed files in `/lib/themes/`.
!> Compressed files are available in `/lib/themes/`.
If you have any ideas or would like to develop new theme, welcome submit [PR](https://github.com/QingWei-Li/docsify/pulls).
```html
<!-- compressed -->
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/pure.css">
```
If you have any ideas or would like to develop a new theme, you are welcome to submit a [pull request](https://github.com/QingWei-Li/docsify/pulls).
#### Click to preview
<div class="demo-theme-preview">
<a data-theme="vue">vue.css</a>
<a data-theme="buble">buble.css</a>
<a data-theme="dark">dark.css</a>
<a data-theme="pure">pure.css</a>
</div>
<style>
.demo-theme-preview a {
padding-right: 10px;
}
.demo-theme-preview a:hover {
text-decoration: underline;
cursor: pointer;
text-decoration: underline;
}
</style>
+18 -8
View File
@@ -1,19 +1,21 @@
# Compatible with Vue
You can write Vue components directly in the Markdown file, and it will be parsed.
You can use this feature to write vue demo and documentation together.
You can write Vue components directly in the Markdown file, and it will be parsed. You can use this feature to write vue demo and documentation together.
## Basic usage
Load the Vue in `index.html`.
Load the Vue in `./index.html`.
```html
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/docsify"></script>
<!-- or use the compressed files -->
<script src="//unpkg.com/vue/dist/vue.min.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
```
Then you can immediately write Vue code at Markdown file.
`new Vue({ el: '#main' })` script is executed by default to create instance.
Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main' })` script is executed by default to create instance.
*README.md*
@@ -59,9 +61,18 @@ You can manually initialize a Vue instance.
*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*
@@ -70,7 +81,7 @@ You can manually initialize a Vue instance.
<vuep template="#example"></vuep>
<script type="text/x-template" id="example">
<script v-pre type="text/x-template" id="example">
<template>
<div>Hello, {{ name }}!</div>
</template>
@@ -85,5 +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/).
+2 -3
View File
@@ -1,7 +1,6 @@
# Write a plugin
A plugin is simply a function that takes `hook` as arguments.
The hook supports handling asynchronous tasks.
A plugin is simply a function that takes `hook` as an argument. The hook supports handling of asynchronous tasks.
## Full configuration
@@ -68,4 +67,4 @@ window.$docsify = {
}
]
}
```
```
+4
View File
@@ -0,0 +1,4 @@
- :cn:
- [:cn: 中文](/zh-cn/)
- [:de: German](/de-de/)
- [:uk: English](/)
+5 -5
View File
@@ -1,8 +1,8 @@
- 入门
- [快速开始](zh-cn/quickstart)
- [多页文档](zh-cn/more-pages)
- [定制导航栏](zh-cn/custom-navbar)
- [封面](zh-cn/cover)
- [快速开始](zh-cn/quickstart)
- [多页文档](zh-cn/more-pages)
- [定制导航栏](zh-cn/custom-navbar)
- [封面](zh-cn/cover)
- 定制化
- [配置项](zh-cn/configuration)
@@ -19,4 +19,4 @@
- [CDN](zh-cn/cdn)
- [离线模式(PWA)](zh-cn/pwa)
- [Changelog](zh-cn/changelog)
- [Changelog](zh-cn/changelog)
+10
View File
@@ -305,3 +305,13 @@ window.$docsify = {
```
注意如果执行的是一个外链脚本,比如 jsfiddle 的内嵌 demo,请确保引入 [external-script](zh-cn/plugins?id=外链脚本-external-script) 插件。
## no-emoji
禁用 emoji 解析。
```js
window.$docsify = {
noEmoji: true
}
```
+21
View File
@@ -63,4 +63,25 @@ docs/zh-cn/guide.md => http://domain.com/zh-cn/guide
<script src="//unpkg.com/docsify"></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.
+9
View File
@@ -6,10 +6,18 @@
<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)。
#### 点击切换主题
@@ -19,6 +27,7 @@
<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>
+26 -1
View File
@@ -58,9 +58,18 @@
*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*
@@ -69,7 +78,7 @@
<vuep template="#example"></vuep>
<script type="text/x-template" id="example">
<script v-pre type="text/x-template" id="example">
<template>
<div>Hello, {{ name }}!</div>
</template>
@@ -84,4 +93,20 @@
</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/)。
+26 -4
View File
@@ -75,6 +75,7 @@ var config = merge({
nameLink: window.location.pathname,
autoHeader: false,
executeScript: null,
noEmoji: false,
ga: ''
}, window.$docsify);
@@ -161,6 +162,9 @@ function getNode (el, noCache) {
if ( noCache === void 0 ) noCache = false;
if (typeof el === 'string') {
if (typeof window.Vue !== 'undefined') {
return find(el)
}
el = noCache ? find(el) : (cacheNode[el] || (cacheNode[el] = find(el)));
}
@@ -2935,7 +2939,7 @@ function replace (m, $1) {
}
function emojify (text) {
return text
return $docsify.noEmoji ? text : text
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, function (m) { return m.replace(/:/g, '__colon__'); })
.replace(/:(\w+?):/ig, window.emojify || replace)
.replace(/__colon__/g, ':')
@@ -2988,10 +2992,24 @@ markdown.update = function () {
* @link https://github.com/chjj/marked#overriding-renderer-methods
*/
renderer.heading = function (text, level) {
var nextToc = { level: level, title: text };
if (/{docsify-ignore}/g.test(text)) {
text = text.replace('{docsify-ignore}', '');
nextToc.title = text;
nextToc.ignoreSubHeading = true;
}
if (/{docsify-ignore-all}/g.test(text)) {
text = text.replace('{docsify-ignore-all}', '');
nextToc.title = text;
nextToc.ignoreAllSubs = true;
}
var slug = slugify(text);
var url = toURL(currentPath, { id: slug });
toc.push({ level: level, slug: url, title: text });
nextToc.slug = url;
toc.push(nextToc);
return ("<h" + level + " id=\"" + slug + "\"><a href=\"" + url + "\" data-id=\"" + slug + "\" class=\"anchor\"><span>" + text + "</span></a></h" + level + ">")
};
@@ -3013,7 +3031,7 @@ renderer.link = function (href, title, text) {
if (title) {
title = " title=\"" + title + "\"";
}
return ("<a href=\"" + href + "\"" + title + blank + ">" + text + "</a>")
return ("<a href=\"" + href + "\"" + (title || '') + blank + ">" + text + "</a>")
};
renderer.paragraph = function (text) {
if (/^!&gt;/.test(text)) {
@@ -3057,7 +3075,11 @@ function sidebar (text, level) {
*/
function subSidebar (el, level) {
if (el) {
toc[0] && toc[0].ignoreAllSubs && (toc = []);
toc[0] && toc[0].level === 1 && toc.shift();
toc.forEach(function (node, i) {
node.ignoreSubHeading && toc.splice(i, 1);
});
var tree$$1 = cacheTree[currentPath] || genTree(toc, level);
el.parentNode.innerHTML += tree(tree$$1, '<ul class="app-sub-sidebar">');
cacheTree[currentPath] = tree$$1;
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,8 +11,8 @@ function handleExternalScript () {
newScript[attribute] = script[attribute];
});
script.parentNode.insertBefore(newScript, script);
script.parentNode.removeChild(script);
container.appendChild(newScript);
}
}
+1 -1
View File
@@ -1 +1 @@
this.D=this.D||{},function(){"use strict";function i(){var i=Docsify.dom.getNode("#main"),n=Docsify.dom.find(i,"script");if(n&&n.src){var c=document.createElement("script");["src","async","defer"].forEach(function(i){c[i]=n[i]}),n.parentNode.removeChild(n),i.appendChild(c)}}var n=function(n){n.doneEach(i)};window.$docsify.plugins=[].concat(n,window.$docsify.plugins)}();
this.D=this.D||{},function(){"use strict";function i(){var i=Docsify.dom.getNode("#main"),n=Docsify.dom.find(i,"script");if(n&&n.src){var o=document.createElement("script");["src","async","defer"].forEach(function(i){o[i]=n[i]}),n.parentNode.insertBefore(o,n),n.parentNode.removeChild(n)}}var n=function(n){n.doneEach(i)};window.$docsify.plugins=[].concat(n,window.$docsify.plugins)}();
+2 -2
View File
@@ -79,7 +79,7 @@ function search (keywords) {
data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; }));
});
keywords = keywords.trim().split(/[\s\-\\\/]+/);
keywords = [].concat(keywords, keywords.trim().split(/[\s\-\\\/]+/));
var loop = function ( i ) {
var post = data[i];
@@ -173,7 +173,7 @@ var dom;
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 .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}";
var code = "\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\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}";
var style = dom.create('style', code);
dom.appendTo(dom.head, style);
}
+1 -1
View File
@@ -1 +1 @@
this.D=this.D||{},function(){"use strict";function e(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(e).replace(/[&<>"'\/]/g,function(e){return n[e]})}function n(){var e=[];return d.dom.findAll("a:not([data-nosearch])").map(function(n){var t=n.href,o=n.getAttribute("href"),a=d.route.parse(t).path;a&&e.indexOf(a)===-1&&!d.route.isAbsolutePath(o)&&e.push(a)}),e}function t(e){localStorage.setItem("docsify.search.expires",Date.now()+e),localStorage.setItem("docsify.search.index",JSON.stringify(g))}function o(e,n){void 0===n&&(n="");var t,o=window.marked.lexer(n),a=window.Docsify.slugify,i=Docsify.route.toURL,r={};return o.forEach(function(n){if("heading"===n.type&&n.depth<=2)t=i(e,{id:a(n.text)}),r[t]={slug:t,title:n.text,body:""};else{if(!t)return;r[t]?r[t].body?r[t].body+="\n"+(n.text||""):r[t].body=n.text:r[t]={slug:t,title:"",body:""}}}),a.clear(),r}function a(n){var t=[],o=[];Object.keys(g).forEach(function(e){o=o.concat(Object.keys(g[e]).map(function(n){return g[e][n]}))}),n=n.trim().split(/[\s\-\\\\/]+/);for(var a=function(a){var i=o[a],r=!1,s="",c=i.title&&i.title.trim(),l=i.body&&i.body.trim(),u=i.slug||"";if(c&&l&&(n.forEach(function(n,t){var o=new RegExp(n,"gi"),a=-1,i=-1;if(a=c&&c.search(o),i=l&&l.search(o),a<0&&i<0)r=!1;else{r=!0,i<0&&(i=0);var u=0,f=0;u=i<11?0:i-10,f=0===u?70:i+n.length+60,f>l.length&&(f=l.length);var p="..."+e(l).substring(u,f).replace(o,'<em class="search-keyword">'+n+"</em>")+"...";s+=p}}),r)){var f={title:e(c),content:s,url:u};t.push(f)}},i=0;i<o.length;i++)a(i);return t}function i(e,a){d=Docsify;var i="auto"===e.paths,r=localStorage.getItem("docsify.search.expires")<Date.now();if(g=JSON.parse(localStorage.getItem("docsify.search.index")),r)g={};else if(!i)return;var s=i?n():e.paths,c=s.length,l=0;s.forEach(function(n){return g[n]?l++:void d.get(a.$getFile(n)).then(function(a){g[n]=o(n,a),c===++l&&t(e.maxAge)})})}function r(){var e="\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}",n=h.create("style",e);h.appendTo(h.head,n)}function s(e){var n='<input type="search" /><div class="results-panel"></div></div>',t=h.create("div",n),o=h.find("aside");h.toggleClass(t,"search"),h.before(o,t)}function c(){var e,n=h.find("div.search"),t=h.find(n,"input"),o=h.find(n,".results-panel"),i=function(e){if(!e)return o.classList.remove("show"),void(o.innerHTML="");var n=a(e),t="";n.forEach(function(e){t+='<div class="matching-post">\n <h2><a href="'+e.url+'">'+e.title+"</a></h2>\n <p>"+e.content+"</p>\n</div>"}),o.classList.add("show"),o.innerHTML=t||'<p class="empty">'+y+"</p>"};h.on(n,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),h.on(t,"input",function(n){clearTimeout(e),e=setTimeout(function(e){return i(n.target.value.trim())},100)})}function l(e,n){var t=h.getNode('.search input[type="search"]');if("string"==typeof e)t.placeholder=e;else{var o=Object.keys(e).find(function(e){return n.indexOf(e)>-1});t.placeholder=e[o]}}function u(e,n){if("string"==typeof e)y=e;else{var t=Object.keys(e).find(function(e){return n.indexOf(e)>-1});y=e[t]}}function f(e){h=Docsify.dom,r(),s(e),c()}function p(e,n){l(e.placeholder,n.route.path),u(e.noData,n.route.path)}var d,h,g={},y="",m={placeholder:"Type to search",noData:"No Results!",paths:"auto",maxAge:864e5},v=function(e,n){var t=Docsify.util,o=n.config.search||m;Array.isArray(o)?m.paths=o:"object"==typeof o&&(m.paths=Array.isArray(o.paths)?o.paths:"auto",m.maxAge=t.isPrimitive(o.maxAge)?o.maxAge:m.maxAge,m.placeholder=o.placeholder||m.placeholder,m.noData=o.noData||m.noData);var a="auto"===m.paths;e.mounted(function(e){f(m),!a&&i(m,n)}),e.doneEach(function(e){p(m,n),a&&i(m,n)})};window.$docsify.plugins=[].concat(v,window.$docsify.plugins)}();
this.D=this.D||{},function(){"use strict";function n(n){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(n).replace(/[&<>"'\/]/g,function(n){return e[n]})}function e(){var n=[];return d.dom.findAll("a:not([data-nosearch])").map(function(e){var t=e.href,a=e.getAttribute("href"),o=d.route.parse(t).path;o&&n.indexOf(o)===-1&&!d.route.isAbsolutePath(a)&&n.push(o)}),n}function t(n){localStorage.setItem("docsify.search.expires",Date.now()+n),localStorage.setItem("docsify.search.index",JSON.stringify(g))}function a(n,e){void 0===e&&(e="");var t,a=window.marked.lexer(e),o=window.Docsify.slugify,r=Docsify.route.toURL,i={};return a.forEach(function(e){if("heading"===e.type&&e.depth<=2)t=r(n,{id:o(e.text)}),i[t]={slug:t,title:e.text,body:""};else{if(!t)return;i[t]?i[t].body?i[t].body+="\n"+(e.text||""):i[t].body=e.text:i[t]={slug:t,title:"",body:""}}}),o.clear(),i}function o(e){var t=[],a=[];Object.keys(g).forEach(function(n){a=a.concat(Object.keys(g[n]).map(function(e){return g[n][e]}))}),e=[].concat(e,e.trim().split(/[\s\-\\\\/]+/));for(var o=function(o){var r=a[o],i=!1,s="",c=r.title&&r.title.trim(),l=r.body&&r.body.trim(),p=r.slug||"";if(c&&l&&(e.forEach(function(e,t){var a=new RegExp(e,"gi"),o=-1,r=-1;if(o=c&&c.search(a),r=l&&l.search(a),o<0&&r<0)i=!1;else{i=!0,r<0&&(r=0);var p=0,u=0;p=r<11?0:r-10,u=0===p?70:r+e.length+60,u>l.length&&(u=l.length);var f="..."+n(l).substring(p,u).replace(a,'<em class="search-keyword">'+e+"</em>")+"...";s+=f}}),i)){var u={title:n(c),content:s,url:p};t.push(u)}},r=0;r<a.length;r++)o(r);return t}function r(n,o){d=Docsify;var r="auto"===n.paths,i=localStorage.getItem("docsify.search.expires")<Date.now();if(g=JSON.parse(localStorage.getItem("docsify.search.index")),i)g={};else if(!r)return;var s=r?e():n.paths,c=s.length,l=0;s.forEach(function(e){return g[e]?l++:void d.get(o.$getFile(e)).then(function(o){g[e]=a(e,o),c===++l&&t(n.maxAge)})})}function i(){var n="\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 7px;\n line-height: 22px;\n font-size: 14px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\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}",e=h.create("style",n);h.appendTo(h.head,e)}function s(n){var e='<input type="search" /><div class="results-panel"></div></div>',t=h.create("div",e),a=h.find("aside");h.toggleClass(t,"search"),h.before(a,t)}function c(){var n,e=h.find("div.search"),t=h.find(e,"input"),a=h.find(e,".results-panel"),r=function(n){if(!n)return a.classList.remove("show"),void(a.innerHTML="");var e=o(n),t="";e.forEach(function(n){t+='<div class="matching-post">\n <h2><a href="'+n.url+'">'+n.title+"</a></h2>\n <p>"+n.content+"</p>\n</div>"}),a.classList.add("show"),a.innerHTML=t||'<p class="empty">'+y+"</p>"};h.on(e,"click",function(n){return"A"!==n.target.tagName&&n.stopPropagation()}),h.on(t,"input",function(e){clearTimeout(n),n=setTimeout(function(n){return r(e.target.value.trim())},100)})}function l(n,e){var t=h.getNode('.search input[type="search"]');if("string"==typeof n)t.placeholder=n;else{var a=Object.keys(n).find(function(n){return e.indexOf(n)>-1});t.placeholder=n[a]}}function p(n,e){if("string"==typeof n)y=n;else{var t=Object.keys(n).find(function(n){return e.indexOf(n)>-1});y=n[t]}}function u(n){h=Docsify.dom,i(),s(n),c()}function f(n,e){l(n.placeholder,e.route.path),p(n.noData,e.route.path)}var d,h,g={},y="",m={placeholder:"Type to search",noData:"No Results!",paths:"auto",maxAge:864e5},v=function(n,e){var t=Docsify.util,a=e.config.search||m;Array.isArray(a)?m.paths=a:"object"==typeof a&&(m.paths=Array.isArray(a.paths)?a.paths:"auto",m.maxAge=t.isPrimitive(a.maxAge)?a.maxAge:m.maxAge,m.placeholder=a.placeholder||m.placeholder,m.noData=a.noData||m.noData);var o="auto"===m.paths;n.mounted(function(n){u(m),!o&&r(m,e)}),n.doneEach(function(n){f(m,e),o&&r(m,e)})};window.$docsify.plugins=[].concat(v,window.$docsify.plugins)}();
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+33 -29
View File
@@ -1,7 +1,18 @@
{
"name": "docsify",
"version": "3.4.0",
"version": "3.4.4",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
"email": "cinwell.li@gmail.com",
"url": "https://github.com/QingWei-Li"
},
"homepage": "https://docsify.js.org",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/QingWei-Li/docsify.git"
},
"main": "lib/docsify.js",
"files": [
"lib",
@@ -14,9 +25,26 @@
"dev": "node app.js & nodemon -w src -e js,css --exec 'npm run dev:build'",
"test": "eslint src"
},
"repository": {
"type": "git",
"url": "https://github.com/QingWei-Li/docsify.git"
"dependencies": {
"marked": "^0.3.6",
"prismjs": "^1.6.0",
"zoom-image": "^0.1.4"
},
"devDependencies": {
"cssnano": "^3.10.0",
"eslint": "^3.17.1",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-vue": "^2.0.1",
"nodemon": "^1.11.0",
"postcss": "^5.2.16",
"postcss-salad": "^1.0.8",
"rollup": "^0.41.5",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-string": "^2.0.2",
"rollup-plugin-uglify": "^1.0.1",
"serve-static": "^1.12.1"
},
"keywords": [
"doc",
@@ -24,29 +52,5 @@
"documentation",
"creator",
"generator"
],
"author": "qingwei-li <cinwell.li@gmail.com> (https://github.com/QingWei-Li)",
"homepage": "https://docsify.js.org",
"license": "MIT",
"devDependencies": {
"cssnano": "^3.8.1",
"eslint": "^3.10.2",
"eslint-config-vue": "^2.0.1",
"eslint-plugin-vue": "^1.0.0",
"nodemon": "^1.11.0",
"postcss": "^5.2.6",
"postcss-salad": "^1.0.5",
"rollup": "^0.41.1",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^7.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-string": "^2.0.2",
"rollup-plugin-uglify": "^1.0.1",
"serve-static": "^1.11.1"
},
"dependencies": {
"marked": "^0.3.6",
"prismjs": "^1.5.1",
"zoom-image": "^0.1.4"
}
]
}
+1
View File
@@ -16,6 +16,7 @@ const config = merge({
nameLink: window.location.pathname,
autoHeader: false,
executeScript: null,
noEmoji: false,
ga: ''
}, window.$docsify)
+21 -3
View File
@@ -52,10 +52,24 @@ markdown.update = function () {
* @link https://github.com/chjj/marked#overriding-renderer-methods
*/
renderer.heading = function (text, level) {
const nextToc = { level, title: text }
if (/{docsify-ignore}/g.test(text)) {
text = text.replace('{docsify-ignore}', '')
nextToc.title = text
nextToc.ignoreSubHeading = true
}
if (/{docsify-ignore-all}/g.test(text)) {
text = text.replace('{docsify-ignore-all}', '')
nextToc.title = text
nextToc.ignoreAllSubs = true
}
const slug = slugify(text)
const url = toURL(currentPath, { id: slug })
toc.push({ level, slug: url, title: text })
nextToc.slug = url
toc.push(nextToc)
return `<h${level} id="${slug}"><a href="${url}" data-id="${slug}" class="anchor"><span>${text}</span></a></h${level}>`
}
@@ -75,7 +89,7 @@ renderer.link = function (href, title, text) {
if (title) {
title = ` title="${title}"`
}
return `<a href="${href}"${title}${blank}>${text}</a>`
return `<a href="${href}"${title || ''}${blank}>${text}</a>`
}
renderer.paragraph = function (text) {
if (/^!&gt;/.test(text)) {
@@ -119,7 +133,11 @@ export function sidebar (text, level) {
*/
export function subSidebar (el, level) {
if (el) {
toc[0] && toc[0].ignoreAllSubs && (toc = [])
toc[0] && toc[0].level === 1 && toc.shift()
toc.forEach((node, i) => {
node.ignoreSubHeading && toc.splice(i, 1)
})
const tree = cacheTree[currentPath] || genTree(toc, level)
el.parentNode.innerHTML += treeTpl(tree, '<ul class="app-sub-sidebar">')
cacheTree[currentPath] = tree
+1 -1
View File
@@ -3,7 +3,7 @@ function replace (m, $1) {
}
export function emojify (text) {
return text
return $docsify.noEmoji ? text : text
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, m => m.replace(/:/g, '__colon__'))
.replace(/:(\w+?):/ig, window.emojify || replace)
.replace(/__colon__/g, ':')
+3
View File
@@ -10,6 +10,9 @@ const cacheNode = {}
*/
export function getNode (el, noCache = false) {
if (typeof el === 'string') {
if (typeof window.Vue !== 'undefined') {
return find(el)
}
el = noCache ? find(el) : (cacheNode[el] || (cacheNode[el] = find(el)))
}
+1 -1
View File
@@ -9,8 +9,8 @@ function handleExternalScript () {
newScript[attribute] = script[attribute]
})
script.parentNode.insertBefore(newScript, script)
script.parentNode.removeChild(script)
container.appendChild(newScript)
}
}
+3
View File
@@ -30,6 +30,9 @@ function style () {
padding: 7px;
line-height: 22px;
font-size: 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.search h2 {
+1 -1
View File
@@ -73,7 +73,7 @@ export function search (keywords) {
data = data.concat(Object.keys(INDEXS[key]).map(page => INDEXS[key][page]))
})
keywords = keywords.trim().split(/[\s\-\\\/]+/)
keywords = [].concat(keywords, keywords.trim().split(/[\s\-\\\/]+/))
for (let i = 0; i < data.length; i++) {
const post = data[i]
+23 -23
View File
@@ -11,16 +11,16 @@ section.cover {
}
&.has-mask .mask {
position: absolute;
size: 100%;
background-color: $color-bg;
opacity: .8;
position: absolute;
size: 100%;
}
.cover-main {
flex: 1;
text-align: center;
margin: -20px 16px 0;
text-align: center;
z-index: 1;
}
@@ -34,65 +34,65 @@ section.cover {
}
p {
margin: 1em 0;
line-height: 1.5rem;
margin: 1em 0;
}
h1 {
text-align: center;
font-size: 2.5rem;
position: relative;
margin: .625rem 0 2.5rem;
font-weight: 300;
color: inherit;
font-size: 2.5rem;
font-weight: 300;
margin: .625rem 0 2.5rem;
position: relative;
text-align: center;
a {
display: block;
}
small {
position: absolute;
bottom: -.4375rem;
font-size: 1rem;
position: absolute;
}
}
blockquote {
text-align: center;
font-size: 1.5rem;
text-align: center;
}
ul {
max-width: 500px;
line-height: 1.8;
list-style-type: none;
margin: 1em auto;
max-width: 500px;
padding: 0;
line-height: 1.8;
}
.cover-main > p:last-child a {
border-radius: 2em;
border-width: 1px;
border-style: solid;
border-color: var(--theme-color, $color-primary);
border-radius: 2rem;
border-style: solid;
border-width: 1px;
box-sizing: border-box;
color: var(--theme-color, $color-primary);
font-size: 1.05em;
letter-spacing: 0.1em;
padding: 0.75em 2em;
display: inline-block;
font-size: 1.05rem;
letter-spacing: 0.1rem;
margin-right: 1rem;
padding: 0.75em 2rem;
text-decoration: none;
transition: all 0.15s ease;
margin-right: 1em;
display: inline-block;
&:last-child {
margin-right: 0;
background-color: var(--theme-color, $color-primary);
color: #fff;
margin-right: 0;
&:hover {
opacity: .8;
color: inherit;
opacity: .8;
}
}
+73 -73
View File
@@ -1,10 +1,10 @@
* {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-text-size-adjust: none;
-webkit-touch-callout: none;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
body:not(.ready) {
@@ -16,10 +16,10 @@ body:not(.ready) {
}
div#app {
text-align: center;
font-size: 30px;
font-weight: lighter;
margin: 40vh auto;
text-align: center;
&:empty::before {
content: "Loading...";
@@ -27,7 +27,7 @@ div#app {
}
.emoji {
height: 1.2em;
height: 1.2rem;
vertical-align: middle;
}
@@ -59,12 +59,12 @@ html, body {
body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
color: $color-text;
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
font-size: 15px;
letter-spacing: 0;
margin: 0;
overflow-x: hidden;
color: $color-text;
}
img {
@@ -72,24 +72,24 @@ img {
}
kbd {
display: inline-block;
padding: 3px 5px;
margin-bottom : 3px;
font-size: 12px !important;
line-height: 12px;
vertical-align: middle;
border: solid 1px #ccc;
border-radius: 3px;
display: inline-block;
font-size: 12px !important;
line-height: 12px;
margin-bottom : 3px;
padding: 3px 5px;
vertical-align: middle;
}
/* navbar */
nav.app-nav {
left: 0;
margin: 25px 60px 0 0;
position: absolute;
right: 0;
left: 0;
z-index: 10;
margin: 25px 60px 0 0;
text-align: right;
z-index: 10;
&.no-badge {
margin-right: 25px;
@@ -100,20 +100,20 @@ nav.app-nav {
}
>a {
margin: 0 1em;
margin: 0 1rem;
padding: 5px 0;
}
ul, li {
list-style: none;
display: inline-block;
list-style: none;
margin: 0;
}
a {
color: inherit;
font-size: 16px;
text-decoration: none;
color: inherit;
transition: color .3s;
&:hover {
@@ -121,41 +121,41 @@ nav.app-nav {
}
&.active {
color: var(--theme-color, $color-primary);
border-bottom: 2px solid var(--theme-color, $color-primary);
color: var(--theme-color, $color-primary);
}
}
/* navbar dropdown */
li {
position: relative;
display: inline-block;
margin: 0 1em;
margin: 0 1rem;
padding: 5px 0;
position: relative;
ul {
display: none;
box-sizing: border-box;
max-height: calc(100vh - 61px);
overflow-y: scroll;
position: absolute;
top: 100%;
right: -15px;
background-color: #fff;
padding: 10px 0;
border: 1px solid #ddd;
border-bottom-color: #ccc;
text-align: left;
border-radius: 4px;
box-sizing: border-box;
display: none;
max-height: calc(100vh - 61px);
overflow-y: scroll;
padding: 10px 0;
position: absolute;
right: -15px;
text-align: left;
top: 100%;
white-space: nowrap;
li {
display: block;
font-size: 14px;
line-height: 1rem;
margin: 0;
margin: 8px 14px;
white-space: nowrap;
line-height: 1em;
}
a {
@@ -178,12 +178,12 @@ nav.app-nav {
/* github corner */
.github-corner {
position: fixed;
top: 0;
right: 0;
z-index: 1;
text-decoration: none;
border-bottom: 0;
position: fixed;
right: 0;
text-decoration: none;
top: 0;
z-index: 1;
&:hover .octo-arm {
animation:octocat-wave 560ms ease-in-out;
@@ -191,23 +191,23 @@ nav.app-nav {
svg {
color: $color-bg;
fill: var(--theme-color, $color-primary);
height: 80px;
width: 80px;
fill: var(--theme-color, $color-primary);
}
}
/* main */
main {
display: block;
size: 100vw 100%;
position: relative;
size: 100vw 100%;
}
.anchor {
display: inline-block;
text-decoration: none;
transition: all .3s;
display: inline-block;
span {
color: $color-text;
@@ -220,19 +220,19 @@ main {
/* sidebar */
.sidebar {
border-right: 1px solid rgba(0, 0, 0, .07);
overflow-y: auto;
padding: 40px 0;
position: absolute 0 * 0 0;
transition: transform 250ms ease-out;
width: $sidebar-width;
z-index: 20;
border-right: 1px solid rgba(0, 0, 0, .07);
> h1 {
text-align: center;
margin: 0 auto 1em;
font-size: 1.5em;
margin: 0 auto 1rem;
font-size: 1.5rem;
font-weight: 300;
text-align: center;
a {
color: inherit;
@@ -255,8 +255,8 @@ main {
}
ul li a {
display: block;
border-bottom: none;
display: block;
}
ul li ul {
@@ -284,17 +284,17 @@ main {
/* sidebar toggle */
.sidebar-toggle {
background-color: transparent;
background-color: rgba($color-bg, .8);
border: 0;
outline: none;
outline: none;
padding: 10px;
position: absolute * * 0 0;
text-align: center;
transition: opacity .3s;
width: 30px;
z-index: 30;
outline: none;
width: calc($sidebar-width - 16px);
padding: 10px;
background-color: rgba($color-bg, .8);
z-index: 30;
.sidebar-toggle-button:hover {
opacity: .4;
@@ -303,8 +303,8 @@ main {
span {
background-color: var(--theme-color, $color-primary);
display: block;
size: 16px 2px;
margin-bottom: 4px;
size: 16px 2px;
}
}
@@ -316,17 +316,17 @@ body.sticky {
/* main content */
.content {
position: absolute 0 0 0 $sidebar-width;
padding-top: 20px;
position: absolute 0 0 0 $sidebar-width;
transition: left 250ms ease;
}
/* markdown content found on pages */
.markdown-section {
position: relative;
margin: 0 auto;
max-width: 800px;
padding: 20px 15px 40px 15px;
position: relative;
> * {
box-sizing: border-box;
@@ -340,28 +340,28 @@ body.sticky {
.markdown-section hr {
border: none;
margin: 2em 0;
border-bottom: 1px solid #eee;
margin: 2em 0;
}
.markdown-section table {
display: block;
width: 100%;
overflow: auto;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 1em;
border-spacing: 0;
display: block;
margin-bottom: 1rem;
overflow: auto;
width: 100%;
}
.markdown-section th {
border: 1px solid #ddd;
font-weight: bold;
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-section td {
padding: 6px 13px;
border: 1px solid #ddd;
padding: 6px 13px;
}
.markdown-section tr {
@@ -372,28 +372,28 @@ body.sticky {
}
.markdown-section p.tip {
padding: 12px 24px 12px 30px;
margin: 2em 0;
border-left: 4px solid #f66;
background-color: #f8f8f8;
position: relative;
border-bottom-right-radius: 2px;
border-left: 4px solid #f66;
border-top-right-radius: 2px;
margin: 2em 0;
padding: 12px 24px 12px 30px;
position: relative;
&:before {
position: absolute;
top: 14px;
left: -12px;
background-color: #f66;
border-radius: 100%;
color: $color-bg;
content: "!";
size: 20px;
border-radius: 100%;
text-align: center;
line-height: 20px;
font-weight: bold;
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
font-size: 14px;
font-weight: bold;
left: -12px;
line-height: 20px;
position: absolute;
size: 20px;
text-align: center;
top: 14px;
}
code {
@@ -406,9 +406,9 @@ body.sticky {
}
.markdown-section p.warn {
padding: 1em;
background: rgba($color-primary, 0.1);
border-radius: 2px;
padding: 1rem;
}
body.close {
@@ -460,8 +460,8 @@ body.close {
}
.sidebar-toggle {
width: auto;
background-color: transparent;
width: auto;
}
body.close {
@@ -470,9 +470,9 @@ body.close {
}
.sidebar-toggle {
width: calc($sidebar-width - 16px);
background-color: rgba($color-bg, .8);
transition: 1s background-color;
width: calc($sidebar-width - 16px);
}
.content {
+34 -35
View File
@@ -3,7 +3,7 @@
$color-primary: #0074D9;
$color-bg: #fff;
$color-text: #34495e;
$sidebar-width: 16em;
$sidebar-width: 16rem;
@import "basic/layout";
@import "basic/coverpage";
@@ -20,8 +20,8 @@ $sidebar-width: 16em;
li {
list-style: none;
padding: 0.2em 0 0.2em 1em;
margin: 0;
padding: 0.2em 0 0.2em 1rem;
}
ul li ul {
@@ -29,11 +29,11 @@ $sidebar-width: 16em;
}
li.active {
background-color: #eee;
a {
color: #333;
}
background-color: #eee;
}
}
@@ -42,8 +42,8 @@ $sidebar-width: 16em;
.markdown-section h3,
.markdown-section h4,
.markdown-section strong {
font-weight: 400;
color: #333;
font-weight: 400;
}
.markdown-section a {
@@ -54,41 +54,40 @@ $sidebar-width: 16em;
.markdown-section p,
.markdown-section ul,
.markdown-section ol {
word-spacing: 0.05em;
line-height: 1.6em;
line-height: 1.6rem;
margin: 0 0 1em 0;
word-spacing: 0.05rem;
}
.markdown-section h1 {
margin: 0 0 1em;
font-size: 2em;
font-size: 2rem;
font-weight: 500;
margin: 0 0 1rem;
}
.markdown-section h2 {
padding: 1rem 0 0 0;
margin: 0 0 1rem 0;
font-size: 1.8em;
font-size: 1.8rem;
font-weight: 400;
margin: 0 0 1rem 0;
padding: 1rem 0 0 0;
}
.markdown-section h3 {
margin: 52px 0 1.2em;
font-size: 1.5em;
font-size: 1.5rem;
margin: 52px 0 1.2rem;
}
.markdown-section h4 {
font-size: 1.25em;
font-size: 1.25rem;
}
.markdown-section h5 {
font-size: 1em;
font-size: 1rem;
}
.markdown-section h6 {
font-size: 1em;
color: #777;
font-size: 1rem;
}
.markdown-section figure,
@@ -100,17 +99,17 @@ $sidebar-width: 16em;
.markdown-section ul,
.markdown-section ol {
padding-left: 1.5em;
padding-left: 1.5rem;
}
.markdown-section li {
margin: 0;
line-height: 1.5;
margin: 0;
}
.markdown-section blockquote {
color: #858585;
border-left: 4px solid var(--theme-color, $color-primary);
color: #858585;
margin: 2em 0;
padding-left: 20px;
}
@@ -130,29 +129,29 @@ $sidebar-width: 16em;
.markdown-section code {
background-color: #f9f9f9;
padding: 0.2em 0.4em;
border-radius: 3px;
white-space: pre;
font-family: Inconsolata;
padding: 0.2em 0.4rem;
white-space: pre;
}
.markdown-section pre {
background-color: #f9f9f9;
border-left: 2px solid #eee;
padding: 8px;
margin: 0 0 1em 0;
font-family: Inconsolata;
padding: 0 10px 12px 0;
font-size: 16px;
margin: 0 0 1em 0;
padding: 8px;
padding: 0 10px 12px 0;
overflow: auto;
word-wrap: normal;
}
/* code highlight */
.token.cdata,
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
.token.prolog {
color: #93a1a1; /* base1 */
}
@@ -218,23 +217,23 @@ $sidebar-width: 16em;
}
.markdown-section pre>code {
background-color: #f8f8f8;
border-radius: 2px;
display: block;
font-family: Inconsolata;
overflow: inherit;
line-height: 1.1rem;
max-width: inherit;
position: relative;
background-color: #f8f8f8;
overflow: inherit;
padding: 20px 0.8em 20px;
line-height: 1.1em;
border-radius: 2px;
position: relative;
}
.markdown-section code::after, .markdown-section code::before {
letter-spacing: 0.05em;
letter-spacing: 0.05rem;
}
code .token {
min-height: 1.5em;
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
min-height: 1.5rem;
}
+32 -32
View File
@@ -14,8 +14,8 @@ body {
/* sidebar */
.sidebar {
color: #c8c8c8;
background-color: $color-bg;
color: #c8c8c8;
li {
margin: 6px 15px;
@@ -23,11 +23,11 @@ body {
ul li a {
color: #c8c8c8;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-decoration: none;
font-size: 14px;
overflow: hidden;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:hover {
text-decoration: underline;
@@ -50,8 +50,8 @@ body {
.markdown-section h3,
.markdown-section h4,
.markdown-section strong {
color: #657b83;
font-weight: 600;
color: #2c3e50;
}
.markdown-section a {
@@ -60,31 +60,31 @@ body {
}
.markdown-section h1 {
margin: 0 0 1em;
font-size: 2em;
font-size: 2rem;
margin: 0 0 1rem;
}
.markdown-section h2 {
font-size: 1.75em;
margin: 45px 0 0.8em;
font-size: 1.75rem;
margin: 45px 0 0.8rem;
}
.markdown-section h3 {
margin: 40px 0 .6em;
font-size: 1.5em;
font-size: 1.5rem;
margin: 40px 0 .6rem;
}
.markdown-section h4 {
font-size: 1.25em;
font-size: 1.25rem;
}
.markdown-section h5 {
font-size: 1em;
font-size: 1rem;
}
.markdown-section h6 {
font-size: 1em;
color: #777;
font-size: 1rem;
}
.markdown-section figure,
@@ -97,18 +97,18 @@ body {
.markdown-section p,
.markdown-section ul,
.markdown-section ol {
line-height: 1.6em;
word-spacing: 0.05em;
line-height: 1.6rem;
word-spacing: 0.05rem;
}
.markdown-section ul,
.markdown-section ol {
padding-left: 1.5em;
padding-left: 1.5rem;
}
.markdown-section blockquote {
color: #858585;
border-left: 4px solid var(--theme-color, $color-primary);
color: #858585;
margin: 2em 0;
padding-left: 20px;
}
@@ -127,14 +127,14 @@ body {
}
.markdown-section code {
background-color: #282828;
border-radius: 2px;
color: #657b83;
font-family: 'Roboto Mono', Monaco, courier, monospace;
font-size: 0.8rem;
margin: 0 2px;
padding: 3px 5px;
white-space: nowrap;
font-size: 0.8em;
font-family: 'Roboto Mono', Monaco, courier, monospace;
background-color: #282828;
}
.markdown-section pre {
@@ -142,11 +142,11 @@ body {
-webkit-font-smoothing: initial;
background-color: #282828;
font-family: 'Roboto Mono', Monaco, courier, monospace;
line-height: 1.5em;
line-height: 1.5rem;
margin: 1.2em 0;
padding: 0 1.4em;
position: relative;
overflow: auto;
padding: 0 1.4rem;
position: relative;
word-wrap: normal;
}
@@ -254,29 +254,29 @@ body {
color: #657b83;
display: block;
font-family: 'Roboto Mono', Monaco, courier, monospace;
font-size: 0.8em;
font-size: 0.8rem;
line-height: inherit;
margin: 0 2px;
max-width: inherit;
overflow: inherit;
padding: 2.2em 5px;
white-space: inherit;
max-width: inherit;
}
.markdown-section code::after, .markdown-section code::before {
letter-spacing: 0.05em;
letter-spacing: 0.05rem;
}
code .token {
min-height: 1.5em;
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial;
min-height: 1.5rem;
}
pre::after {
color: #ccc;
content: attr(data-lang);
font-size: 0.6em;
font-size: 0.6rem;
font-weight: 600;
height: 15px;
line-height: 15px;
@@ -293,7 +293,7 @@ pre::after {
}
input[type="search"] {
border-color: #4f4f4f;
background: #4f4f4f;
border-color: #4f4f4f;
color: #c8c8c8;
}
+32 -32
View File
@@ -14,8 +14,8 @@ body {
/* sidebar */
.sidebar {
color: #364149;
background-color: $color-bg;
color: #364149;
li {
margin: 6px 0 6px 15px;
@@ -23,12 +23,12 @@ body {
ul li a {
color: #505d6b;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-decoration: none;
font-size: 14px;
font-weight: normal;
overflow: hidden;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:hover {
text-decoration: underline;
@@ -40,9 +40,9 @@ body {
}
ul li.active>a {
border-right: 2px solid;
color: var(--theme-color, $color-primary);
font-weight: 600;
border-right: 2px solid;
}
}
@@ -61,8 +61,8 @@ body {
.markdown-section h3,
.markdown-section h4,
.markdown-section strong {
font-weight: 600;
color: #2c3e50;
font-weight: 600;
}
.markdown-section a {
@@ -71,31 +71,31 @@ body {
}
.markdown-section h1 {
margin: 0 0 1em;
font-size: 2em;
font-size: 2rem;
margin: 0 0 1rem;
}
.markdown-section h2 {
font-size: 1.75em;
margin: 45px 0 0.8em;
font-size: 1.75rem;
margin: 45px 0 0.8rem;
}
.markdown-section h3 {
margin: 40px 0 .6em;
font-size: 1.5em;
font-size: 1.5rem;
margin: 40px 0 .6rem;
}
.markdown-section h4 {
font-size: 1.25em;
font-size: 1.25rem;
}
.markdown-section h5 {
font-size: 1em;
font-size: 1rem;
}
.markdown-section h6 {
font-size: 1em;
color: #777;
font-size: 1rem;
}
.markdown-section figure,
@@ -108,18 +108,18 @@ body {
.markdown-section p,
.markdown-section ul,
.markdown-section ol {
line-height: 1.6em;
word-spacing: 0.05em;
line-height: 1.6rem;
word-spacing: 0.05rem;
}
.markdown-section ul,
.markdown-section ol {
padding-left: 1.5em;
padding-left: 1.5rem;
}
.markdown-section blockquote {
color: #858585;
border-left: 4px solid var(--theme-color, $color-primary);
color: #858585;
margin: 2em 0;
padding-left: 20px;
}
@@ -138,14 +138,14 @@ body {
}
.markdown-section code {
background-color: #f8f8f8;
border-radius: 2px;
color: #e96900;
font-family: 'Roboto Mono', Monaco, courier, monospace;
font-size: 0.8rem;
margin: 0 2px;
padding: 3px 5px;
white-space: nowrap;
font-size: 0.8em;
font-family: 'Roboto Mono', Monaco, courier, monospace;
background-color: #f8f8f8;
}
.markdown-section pre {
@@ -153,11 +153,11 @@ body {
-webkit-font-smoothing: initial;
background-color: #f8f8f8;
font-family: 'Roboto Mono', Monaco, courier, monospace;
line-height: 1.5em;
line-height: 1.5rem;
margin: 1.2em 0;
padding: 0 1.4em;
position: relative;
overflow: auto;
padding: 0 1.4rem;
position: relative;
word-wrap: normal;
}
@@ -265,29 +265,29 @@ body {
color: #525252;
display: block;
font-family: 'Roboto Mono', Monaco, courier, monospace;
font-size: 0.8em;
font-size: 0.8rem;
line-height: inherit;
margin: 0 2px;
max-width: inherit;
overflow: inherit;
padding: 2.2em 5px;
white-space: inherit;
max-width: inherit;
}
.markdown-section code::after, .markdown-section code::before {
letter-spacing: 0.05em;
letter-spacing: 0.05rem;
}
code .token {
min-height: 1.5em;
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial;
min-height: 1.5rem;
}
pre::after {
color: #ccc;
content: attr(data-lang);
font-size: 0.6em;
font-size: 0.6rem;
font-weight: 600;
height: 15px;
line-height: 15px;