Compare commits

..
42 Commits
Author SHA1 Message Date
qingwei.li 405349102f chore: add changelog 4.5.2 2017-11-09 13:06:59 +08:00
qingwei.li 9d6595d04b [build] 4.5.2 2017-11-09 13:06:57 +08:00
cinwell.liandGitHub d486eef6cc feat: github task lists, close #215 (#305) 2017-11-09 13:06:23 +08:00
qingwei.li b3c3180bab chore: add changelog 4.5.1 2017-11-07 20:03:42 +08:00
qingwei.li c30af850a1 [build] 4.5.1 2017-11-07 20:03:41 +08:00
qingwei.li 2a2ed96eb8 feat: fetch files with the query params, fixed #303 2017-11-07 20:03:11 +08:00
Desmondandcinwell.li 0d54c0cf83 Add zooming to showcase (#302) 2017-11-05 00:42:10 -05:00
qingwei.li f27ce7d2b2 chore: add changelog 4.5.0 2017-11-04 13:56:25 +08:00
qingwei.li 2e1a7367a8 [build] 4.5.0 2017-11-04 13:56:24 +08:00
qingwei.li 7510f75968 fix lint 2017-11-04 13:56:08 +08:00
qingwei.li fd7d4e0e4e feat: add disqus plugin, closed #123 2017-11-04 13:54:37 +08:00
qingwei.li 025bc5cddf chore: update all plugins.md, fixed #187 2017-11-02 10:48:09 +08:00
cinwell.liandGitHub 8f1066a035 chore: update doc
fixed #187
2017-11-01 21:43:09 -05:00
qingwei.li 800c0c503a chore: add changelog 4.4.1 2017-10-31 21:48:15 +08:00
qingwei.li d5194b4f6b [build] 4.4.1 2017-10-31 21:48:15 +08:00
cinwell.liandGitHub fa772cfa94 fix: zoom image plugin issue, fixed #187 (#300) 2017-10-31 08:20:08 -05:00
Li Xueliandcinwell.li cc98f56cdd fix: {docsify-ignore-all} and {docsify-ignore} bug (#299)
* fix {docsify-ignore-all} not work bug

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

* add meta tag for IE browser

* fix link render issue after page refreshing

* fix issue of incorrect active link

Should use both `path` and `id` to identify link, as `id` might not be unique under different paths
2017-10-15 08:25:49 -05:00
49 changed files with 769 additions and 564 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
*.log
.DS_Store
/themes
/themes/
node_modules
/lib/
+101
View File
@@ -1,3 +1,104 @@
<a name="4.5.2"></a>
## [4.5.2](https://github.com/QingWei-Li/docsify/compare/v4.5.1...v4.5.2) (2017-11-09)
### Features
* github task lists, close [#215](https://github.com/QingWei-Li/docsify/issues/215) ([#305](https://github.com/QingWei-Li/docsify/issues/305)) ([d486eef](https://github.com/QingWei-Li/docsify/commit/d486eef))
<a name="4.5.1"></a>
## [4.5.1](https://github.com/QingWei-Li/docsify/compare/v4.5.0...v4.5.1) (2017-11-07)
### Features
* fetch files with the query params, fixed [#303](https://github.com/QingWei-Li/docsify/issues/303) ([2a2ed96](https://github.com/QingWei-Li/docsify/commit/2a2ed96))
<a name="4.5.0"></a>
# [4.5.0](https://github.com/QingWei-Li/docsify/compare/v4.4.1...v4.5.0) (2017-11-04)
### Features
* add disqus plugin, closed [#123](https://github.com/QingWei-Li/docsify/issues/123) ([fd7d4e0](https://github.com/QingWei-Li/docsify/commit/fd7d4e0))
<a name="4.4.1"></a>
## [4.4.1](https://github.com/QingWei-Li/docsify/compare/v4.4.0...v4.4.1) (2017-10-31)
### Bug Fixes
* {docsify-ignore-all} and {docsify-ignore} bug ([#299](https://github.com/QingWei-Li/docsify/issues/299)) ([cc98f56](https://github.com/QingWei-Li/docsify/commit/cc98f56))
* zoom image plugin issue, fixed [#187](https://github.com/QingWei-Li/docsify/issues/187) ([#300](https://github.com/QingWei-Li/docsify/issues/300)) ([fa772cf](https://github.com/QingWei-Li/docsify/commit/fa772cf))
<a name="4.4.0"></a>
# [4.4.0](https://github.com/QingWei-Li/docsify/compare/v4.3.15...v4.4.0) (2017-10-30)
### Bug Fixes
* sidebar style issue on firefox, fixed [#184](https://github.com/QingWei-Li/docsify/issues/184) ([#297](https://github.com/QingWei-Li/docsify/issues/297)) ([36bfc9d](https://github.com/QingWei-Li/docsify/commit/36bfc9d))
### Features
* add helper for disabled link, fixed [#295](https://github.com/QingWei-Li/docsify/issues/295) ([#296](https://github.com/QingWei-Li/docsify/issues/296)) ([4ad96f3](https://github.com/QingWei-Li/docsify/commit/4ad96f3))
<a name="4.3.15"></a>
## [4.3.15](https://github.com/QingWei-Li/docsify/compare/v4.3.14...v4.3.15) (2017-10-20)
### Bug Fixes
* scroll active sidebar ([a2b8eae](https://github.com/QingWei-Li/docsify/commit/a2b8eae))
<a name="4.3.14"></a>
## [4.3.14](https://github.com/QingWei-Li/docsify/compare/v4.3.13...v4.3.14) (2017-10-20)
### Bug Fixes
* codesponsor style ([ab68268](https://github.com/QingWei-Li/docsify/commit/ab68268))
<a name="4.3.13"></a>
## [4.3.13](https://github.com/QingWei-Li/docsify/compare/v4.3.12...v4.3.13) (2017-10-17)
### Bug Fixes
* duplicate results in search fixed [#257](https://github.com/QingWei-Li/docsify/issues/257) ([#284](https://github.com/QingWei-Li/docsify/issues/284)) ([3476f6f](https://github.com/QingWei-Li/docsify/commit/3476f6f))
### Features
* make whole search result clickable ([#285](https://github.com/QingWei-Li/docsify/issues/285)) ([1b91227](https://github.com/QingWei-Li/docsify/commit/1b91227))
<a name="4.3.12"></a>
## [4.3.12](https://github.com/QingWei-Li/docsify/compare/v4.3.11...v4.3.12) (2017-10-15)
### Bug Fixes
* incorrect active link ([#281](https://github.com/QingWei-Li/docsify/issues/281)) ([a3ab379](https://github.com/QingWei-Li/docsify/commit/a3ab379))
<a name="4.3.11"></a>
## [4.3.11](https://github.com/QingWei-Li/docsify/compare/v4.3.10...v4.3.11) (2017-10-15)
+4
View File
@@ -46,6 +46,7 @@ Create an `index.html`.
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
</head>
@@ -83,6 +84,9 @@ These projects are using docsify to generate their sites. Pull requests welcome
| [xTeko](https://docs.xteko.com/) | Addins framework for Pin 3.0 |
| [vue2-datatable-component](https://github.com/OneWayTech/vue2-datatable) | The best Datatable for Vue.js 2.x which never sucks |
| [Solidarity](https://infinitered.github.io/solidarity/) | Environment enforcer for your projects across machines. |
| [rnback](https://rnback.com/) | Backend service for react-native applications. |
| [IT-films](https://greybax.github.com/IT-films/) | A curated list of awesome movies, documentaries and TV series about hackers, geeks and IT in common, sorted by IMDB rating. |
| [zooming](http://desmonding.me/zooming/docs) | Image zoom that makes sense. |
## Similar projects
+2 -1
View File
@@ -48,7 +48,8 @@ var plugins = [
{ name: 'external-script', entry: 'external-script.js' },
{ name: 'front-matter', entry: 'front-matter/index.js' },
{ name: 'zoom-image', entry: 'zoom-image.js' },
{ name: 'codesponsor', entry: 'codesponsor.js' }
{ name: 'codesponsor', entry: 'codesponsor.js' },
{ name: 'disqus', entry: 'disqus.js' }
]
plugins.forEach(item => {
+1
View File
@@ -29,6 +29,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
# commit
git add -A
git add -f lib/ -A
git commit -m "[build] $VERSION $RELEASE_TAG"
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
+34 -34
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>docsify</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="/themes/vue.css" title="vue">
<link rel="stylesheet" href="/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="/themes/buble.css" title="buble" disabled>
@@ -16,38 +16,38 @@
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
alias: {
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_navbar.md': '/_navbar.md'
},
auto2top: true,
basePath: '/docs/',
executeScript: true,
loadNavbar: true,
loadSidebar: true,
coverpage: true,
name: 'docsify',
subMaxLevel: 2,
mergeNavbar: true,
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/' + vm.route.file
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
</script>
<script src="/lib/docsify.js"></script>
</body>
<script>
window.$docsify = {
alias: {
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_navbar.md': '/_navbar.md'
},
auto2top: true,
basePath: '/docs/',
executeScript: true,
loadNavbar: true,
loadSidebar: true,
coverpage: true,
name: 'docsify',
subMaxLevel: 2,
mergeNavbar: true,
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/' + vm.route.file
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
</script>
<script src="/lib/docsify.js"></script>
</html>
+1 -1
View File
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>4.3.11</small>
# docsify <small>4.5.2</small>
> A magical documentation site generator.
+20
View File
@@ -56,3 +56,23 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
[link](/demo ":target=_blank")
[link](/demo2 ":target=_self")
```
## Github Task Lists
```md
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
```
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
+7 -1
View File
@@ -91,12 +91,18 @@ Wenn das Skript auf der Seite ein externes ist (eine Javascript Datei über das
## Bilder zoomen
Medium's Bilderzoom. Basierend auf [zoom-image](https://github.com/egoist/zoom-image).
Medium's Bilderzoom. Basierend auf [medium-zoom](https://github.com/francoischalifour/medium-zoom).
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
```
Exclude the special image
```markdown
![](image.png ':no-zoom')
```
## Edit on github
Add `Edit on github` button on every pages. provided by 3rd party, check [document](https://github.com/njleonzhang/docsify-edit-on-github)
+1
View File
@@ -45,6 +45,7 @@ Wenn du `npm` nicht verwenden möchtest, oder Probleme bei der Installation des
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
+25
View File
@@ -57,3 +57,28 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
[link](/demo2 ":target=_self")
```
## Disable link
```md
[link](/demo ":disabled")
```
## Github Task Lists
```md
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
```
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
+54 -54
View File
@@ -20,59 +20,59 @@
</head>
<body>
<div id="app">Loading ...</div>
</body>
<script>
window.$docsify = {
alias: {
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_navbar.md': '/_navbar.md'
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
codesponsor: '7c9Ms7xRs-j_y_8abU03DA',
ga: 'UA-106147152-1',
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
<script>
window.$docsify = {
alias: {
'.*?/changelog': 'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG',
'/.*/_navbar.md': '/_navbar.md'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/docs/' + vm.route.file
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/codesponsor.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
codesponsor: '7c9Ms7xRs-j_y_8abU03DA',
ga: 'UA-106147152-1',
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/QingWei-Li/docsify/blob/master/docs/' + vm.route.file
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return editHtml
+ html
+ '\n----\n'
+ 'Last modified {docsify-updated} '
+ editHtml
})
}
]
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/codesponsor.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
</body>
</html>
+22 -1
View File
@@ -91,12 +91,19 @@ If the script on the page is an external one (imports a js file via `src` attrib
## Zoom image
Medium's Image Zoom. Based on [zoom-image](https://github.com/egoist/zoom-image).
Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour/medium-zoom).
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
```
Exclude the special image
```markdown
![](image.png ':no-zoom')
```
## Edit on github
Add `Edit on github` button on every pages. provided by 3rd party, check [document](https://github.com/njleonzhang/docsify-edit-on-github)
@@ -140,3 +147,17 @@ window.$docsify = {
```
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
## Disqus
Disqus comments. https://disqus.com/
```html
<script>
window.$docsify = {
disqus: 'shortname'
}
</script>
<script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script>
```
+1
View File
@@ -45,6 +45,7 @@ If you don't like `npm` or have trouble installing the tool, you can manually cr
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
+2 -2
View File
@@ -19,7 +19,7 @@ Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main'
*README.md*
```markdown
````markdown
# Vue guide
`v-for` usage.
@@ -33,7 +33,7 @@ Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main'
<ul>
<li v-for="i in 10">{{ i }}</li>
</ul>
```
````
You can manually initialize a Vue instance.
+20
View File
@@ -56,3 +56,23 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
[link](/demo ":target=_blank")
[link](/demo2 ":target=_self")
```
## Github Task Lists
```md
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
```
* [ ] foo
* bar
* [x] baz
* [] bam
* [ ] bim
* [ ] lim
+9 -1
View File
@@ -85,13 +85,21 @@
## 图片缩放 - Zoom image
Medium's 风格的图片缩放插件. 基于 [zoom-image](https://github.com/egoist/zoom-image)。
Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/francoischalifour/medium-zoom)。
```html
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
```
忽略某张图片
```markdown
![](image.png ':no-zoom')
```
## Edit on github
Add `Edit on github` button on every pages. provided by 3rd party, check [document](https://github.com/njleonzhang/docsify-edit-on-github)
+1
View File
@@ -45,6 +45,7 @@ docsify serve docs
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
+131 -51
View File
@@ -2758,10 +2758,13 @@ function parseQuery (query) {
return res
}
function stringifyQuery (obj) {
function stringifyQuery (obj, ignores) {
if ( ignores === void 0 ) ignores = [];
var qs = [];
for (var key in obj) {
if (ignores.indexOf(key) > -1) { continue }
qs.push(
obj[key]
? ((encode(key)) + "=" + (encode(obj[key]))).toLowerCase()
@@ -2794,6 +2797,22 @@ var cleanPath = cached(function (path) {
});
var cachedLinks = {};
function getAndRemoveConfig (str) {
if ( str === void 0 ) str = '';
var config = {};
if (str) {
str = str
.replace(/:([\w-]+)=?([\w-]+)?/g, function (m, key, value) {
config[key] = value || true;
return ''
})
.trim();
}
return { str: str, config: config }
}
var Compiler = function Compiler (config, router) {
this.config = config;
@@ -2810,9 +2829,11 @@ var Compiler = function Compiler (config, router) {
if (isFn(mdConf)) {
compile = mdConf(marked, renderer);
} else {
marked.setOptions(merge(mdConf, {
renderer: merge(renderer, mdConf.renderer)
}));
marked.setOptions(
merge(mdConf, {
renderer: merge(renderer, mdConf.renderer)
})
);
compile = marked;
}
@@ -2881,33 +2902,47 @@ Compiler.prototype._initRenderer = function _initRenderer () {
origin.code = renderer.code = function (code, lang) {
if ( lang === void 0 ) lang = '';
var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
var hl = prism.highlight(
code,
prism.languages[lang] || prism.languages.markup
);
return ("<pre v-pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + hl + "</code></pre>")
};
origin.link = renderer.link = function (href, title, text) {
var blank = '';
if ( title === void 0 ) title = '';
if (!/:|(\/{2})/.test(href) &&
var attrs = '';
var ref = getAndRemoveConfig(title);
var str = ref.str;
var config = ref.config;
title = str;
if (
!/:|(\/{2})/.test(href) &&
!_self.matchNotCompileLink(href) &&
!/(\s?:ignore)(\s\S+)?$/.test(title)) {
!config.ignore
) {
href = router.toURL(href, null, router.getCurrentPath());
} else {
blank = " target=\"" + linkTarget + "\"";
title = title && title.replace(/:ignore/g, '').trim();
attrs += " target=\"" + linkTarget + "\"";
}
var target = title && title.match(/:target=\w+/);
if (target) {
target = target[0];
title = title.replace(target, '');
blank = ' ' + target.slice(1);
if (config.target) {
attrs += ' target=' + config.target;
}
if (config.disabled) {
attrs += ' disabled';
href = 'javascript:void(0)';
}
if (title) {
title = " title=\"" + title + "\"";
attrs += " title=\"" + title + "\"";
}
return ("<a href=\"" + href + "\"" + (title || '') + blank + ">" + text + "</a>")
return ("<a href=\"" + href + "\"" + attrs + ">" + text + "</a>")
};
origin.paragraph = renderer.paragraph = function (text) {
if (/^!&gt;/.test(text)) {
@@ -2919,13 +2954,35 @@ Compiler.prototype._initRenderer = function _initRenderer () {
};
origin.image = renderer.image = function (href, title, text) {
var url = href;
var titleHTML = title ? (" title=\"" + title + "\"") : '';
var attrs = '';
var ref = getAndRemoveConfig(title);
var str = ref.str;
var config = ref.config;
title = str;
if (config['no-zoom']) {
attrs += ' data-no-zoom';
}
if (title) {
attrs += " title=\"" + title + "\"";
}
if (!isAbsolutePath(href)) {
url = getPath(contentBase, href);
}
return ("<img src=\"" + url + "\" data-origin=\"" + href + "\" alt=\"" + text + "\"" + titleHTML + ">")
return ("<img src=\"" + url + "\"data-origin=\"" + href + "\" alt=\"" + text + "\"" + attrs + ">")
};
var CHECKED_RE = /^\[([ x])\] +/;
origin.listitem = renderer.listitem = function (text) {
var checked = CHECKED_RE.exec(text);
if (checked) {
text = text.replace(CHECKED_RE, ("<input type=\"checkbox\" " + (checked[1] === 'x' ? 'checked' : '') + " />"));
}
return ("<li>" + text + "</li>\n")
};
renderer.origin = origin;
@@ -2965,11 +3022,12 @@ Compiler.prototype.subSidebar = function subSidebar (level) {
var cacheTree = ref.cacheTree;
var toc = ref.toc;
toc[0] && toc[0].ignoreAllSubs && (this.toc = []);
toc[0] && toc[0].ignoreAllSubs && toc.splice(0);
toc[0] && toc[0].level === 1 && toc.shift();
toc.forEach(function (node, i) {
node.ignoreSubHeading && toc.splice(i, 1);
});
for (var i = 0; i < toc.length; i++) {
toc[i].ignoreSubHeading && toc.splice(i, 1) && i--;
}
var tree$$1 = cacheTree[currentPath] || genTree(toc, level);
@@ -3182,7 +3240,7 @@ function scrollTo (el) {
.begin();
}
function highlight () {
function highlight (path) {
if (!enableScrollEvent) { return }
var sidebar = getNode('.sidebar');
var anchors = findAll('.anchor');
@@ -3203,7 +3261,7 @@ function highlight () {
}
}
if (!last) { return }
var li = nav[last.getAttribute('data-id')];
var li = nav[getNavKey(path, last.getAttribute('data-id'))];
if (!li || li === active) { return }
@@ -3226,6 +3284,10 @@ function highlight () {
}
}
function getNavKey (path, id) {
return (path + "?id=" + id)
}
function scrollActiveSidebar (router) {
var cover = find('.cover.show');
coverHeight = cover ? cover.offsetHeight : 0;
@@ -3240,16 +3302,19 @@ function scrollActiveSidebar (router) {
var href = a.getAttribute('href');
if (href !== '/') {
href = router.parse(href).query.id;
var ref = router.parse(href);
var id = ref.query.id;
var path$1 = ref.path;
if (id) { href = getNavKey(path$1, id); }
}
if (href) { nav[decodeURIComponent(href)] = li; }
}
if (isMobile) { return }
off('scroll', highlight);
on('scroll', highlight);
var path = router.getCurrentPath();
off('scroll', function () { return highlight(path); });
on('scroll', function () { return highlight(path); });
on(sidebar, 'mouseover', function () {
hoverOver = true;
});
@@ -3258,13 +3323,13 @@ function scrollActiveSidebar (router) {
});
}
function scrollIntoView (id) {
function scrollIntoView (path, id) {
if (!id) { return }
var section = find('#' + id);
section && scrollTo(section);
var li = nav[id];
var li = nav[getNavKey(path, id)];
var sidebar = getNode('.sidebar');
var active = find(sidebar, 'li.active');
active && active.classList.remove('active');
@@ -3618,7 +3683,7 @@ var HashHistory = (function (History$$1) {
var query = '';
var hashIndex = path.indexOf('#');
if (hashIndex) {
if (hashIndex >= 0) {
path = path.slice(hashIndex + 1);
}
@@ -3782,7 +3847,7 @@ function initRouter (vm) {
function eventMixin (proto) {
proto.$resetEvents = function () {
scrollIntoView(this.route.query.id);
scrollIntoView(this.route.path, this.route.query.id);
getAndActive(this.router, 'nav');
};
}
@@ -3798,14 +3863,14 @@ function initEvent (vm) {
}
}
function loadNested (path, file, next, vm, first) {
function loadNested (path, qs, file, next, vm, first) {
path = first ? path : path.replace(/\/$/, '');
path = getParentPath(path);
if (!path) { return }
get(vm.router.getFile(path + file))
.then(next, function (_) { return loadNested(path, file, next, vm); });
get(vm.router.getFile(path + file) + qs).then(next, function (_) { return loadNested(path, qs, file, next, vm); }
);
}
function fetchMixin (proto) {
@@ -3816,6 +3881,8 @@ function fetchMixin (proto) {
var ref = this.route;
var path = ref.path;
var query = ref.query;
var qs = stringifyQuery(query, ['id']);
var ref$1 = this.config;
var loadNavbar = ref$1.loadNavbar;
var loadSidebar = ref$1.loadSidebar;
@@ -3823,7 +3890,7 @@ function fetchMixin (proto) {
// Abort last request
last && last.abort && last.abort();
last = get(this.router.getFile(path), true);
last = get(this.router.getFile(path) + qs, true);
// Current page is html
this.isHTML = /\.html$/g.test(path);
@@ -3831,25 +3898,37 @@ function fetchMixin (proto) {
var loadSideAndNav = function () {
if (!loadSidebar) { return cb() }
var fn = function (result) { this$1._renderSidebar(result); cb(); };
var fn = function (result) {
this$1._renderSidebar(result);
cb();
};
// Load sidebar
loadNested(path, loadSidebar, fn, this$1, true);
loadNested(path, qs, loadSidebar, fn, this$1, true);
};
// Load main content
last.then(function (text, opt) {
this$1._renderMain(text, opt);
loadSideAndNav();
},
function (_) {
this$1._renderMain(null);
loadSideAndNav();
});
last.then(
function (text, opt) {
this$1._renderMain(text, opt);
loadSideAndNav();
},
function (_) {
this$1._renderMain(null);
loadSideAndNav();
}
);
// Load nav
loadNavbar &&
loadNested(path, loadNavbar, function (text) { return this$1._renderNav(text); }, this, true);
loadNested(
path,
qs,
loadNavbar,
function (text) { return this$1._renderNav(text); },
this,
true
);
};
proto._fetchCover = function () {
@@ -3857,6 +3936,7 @@ function fetchMixin (proto) {
var ref = this.config;
var coverpage = ref.coverpage;
var query = this.route.query;
var root = getParentPath(this.route.path);
var path = this.router.getFile(root + coverpage);
@@ -3866,8 +3946,8 @@ function fetchMixin (proto) {
}
this.coverIsHTML = /\.html$/g.test(path);
get(path)
.then(function (text) { return this$1._renderCover(text); });
get(path + stringifyQuery(query, ['id'])).then(function (text) { return this$1._renderCover(text); }
);
};
proto.$fetch = function (cb) {
@@ -3983,7 +4063,7 @@ initGlobalAPI();
/**
* Version
*/
Docsify.version = '4.3.11';
Docsify.version = '4.5.2';
/**
* Run Docsify
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -16,7 +16,7 @@ function tpl (id, options) {
var div = Docsify.dom.create('div');
Docsify.dom.toggleClass(div, 'codesponsor');
div.innerHTML = "<iframe\n scrolling=0\n frameborder=0\n width=250\n height=250\n id=\"code-sponsor-embed-iframe\"\n src=\"https://app.codesponsor.io/widgets/" + id + "?" + (qs.join('&')) + "\">\n </iframe>";
div.innerHTML = "<iframe\n scrolling=0\n frameborder=0\n width=250\n height=auto\n style=\"max-height: 250px;\"\n id=\"code-sponsor-embed-iframe\"\n src=\"https://app.codesponsor.io/widgets/" + id + "?" + (qs.join('&')) + "\">\n </iframe>";
return div
}
+1 -1
View File
@@ -1 +1 @@
!function(){"use strict";function o(o,n){var i=[];for(var s in n)i.push(s+"="+n[s]);var e=Docsify.dom.create("div");return Docsify.dom.toggleClass(e,"codesponsor"),e.innerHTML='<iframe\n scrolling=0\n frameborder=0\n width=250\n height=250\n id="code-sponsor-embed-iframe"\n src="https://app.codesponsor.io/widgets/'+o+"?"+i.join("&")+'">\n </iframe>',e}function n(n,i){var s=o(n,i);Docsify.dom.before(Docsify.dom.find("section.content"),s)}function i(){Docsify.dom.style("\n .codesponsor {\n position: relative;\n float: right;\n right: 10px;\n top: 10px;\n }\n\n @media screen and (min-width: 1600px) {\n body.sticky .codesponsor {\n position: fixed;\n }\n\n .codesponsor {\n position: absolute;\n bottom: 10px;\n top: auto;\n float: none;\n }\n }\n ")}var s={theme:"light",image:"show"},e=function(o,e){var t,r=e.config.codesponsor;"string"==typeof r?(t=r,r={}):t=r.id;var c=Docsify.util.merge(s,r);if(!t)throw Error("codesponsor plugin need id");Docsify.util.isMobile||o.ready(function(){i(),n(t,c)})};window.$docsify.plugins=[].concat(e,window.$docsify.plugins)}();
!function(){"use strict";function o(o,n){var i=[];for(var e in n)i.push(e+"="+n[e]);var s=Docsify.dom.create("div");return Docsify.dom.toggleClass(s,"codesponsor"),s.innerHTML='<iframe\n scrolling=0\n frameborder=0\n width=250\n height=auto\n style="max-height: 250px;"\n id="code-sponsor-embed-iframe"\n src="https://app.codesponsor.io/widgets/'+o+"?"+i.join("&")+'">\n </iframe>',s}function n(n,i){var e=o(n,i);Docsify.dom.before(Docsify.dom.find("section.content"),e)}function i(){Docsify.dom.style("\n .codesponsor {\n position: relative;\n float: right;\n right: 10px;\n top: 10px;\n }\n\n @media screen and (min-width: 1600px) {\n body.sticky .codesponsor {\n position: fixed;\n }\n\n .codesponsor {\n position: absolute;\n bottom: 10px;\n top: auto;\n float: none;\n }\n }\n ")}var e={theme:"light",image:"show"},s=function(o,s){var t,r=s.config.codesponsor;"string"==typeof r?(t=r,r={}):t=r.id;var c=Docsify.util.merge(e,r);if(!t)throw Error("codesponsor plugin need id");Docsify.util.isMobile||o.ready(function(){i(),n(t,c)})};window.$docsify.plugins=[].concat(s,window.$docsify.plugins)}();
+53
View File
@@ -0,0 +1,53 @@
(function () {
'use strict';
location.href = location.href.replace('/-/', '/#/');
function install (hook, vm) {
var dom = Docsify.dom;
var disqus = vm.config.disqus;
if (!disqus) {
throw Error('$docsify.disqus is required')
}
hook.init(function (_) {
var script = dom.create('script');
script.async = true;
script.src = "https://" + disqus + ".disqus.com/embed.js";
script.setAttribute('data-timestamp', +new Date());
dom.appendTo(dom.body, script);
});
hook.mounted(function (_) {
var div = dom.create('div');
div.id = 'disqus_thread';
var main = dom.getNode('#main');
div.style = "width: " + (main.clientWidth) + "px; margin: 0 auto 20px;";
dom.appendTo(dom.find('.content'), div);
// eslint-disable-next-line
window.disqus_config = function() {
this.page.url = location.origin + '/-' + vm.route.path;
this.page.identifier = vm.route.path;
this.page.title = document.title;
};
});
hook.doneEach(function (_) {
if (typeof window.DISQUS !== 'undefined') {
window.DISQUS.reset({
reload: true,
config: function () {
this.page.url = location.origin + '/-' + vm.route.path;
this.page.identifier = vm.route.path;
this.page.title = document.title;
}
});
}
});
}
$docsify.plugins = [].concat(install, $docsify.plugins);
}());
+1
View File
@@ -0,0 +1 @@
!function(){"use strict";function i(i,t){var e=Docsify.dom,o=t.config.disqus;if(!o)throw Error("$docsify.disqus is required");i.init(function(i){var t=e.create("script");t.async=!0,t.src="https://"+o+".disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),e.appendTo(e.body,t)}),i.mounted(function(i){var o=e.create("div");o.id="disqus_thread";var n=e.getNode("#main");o.style="width: "+n.clientWidth+"px; margin: 0 auto 20px;",e.appendTo(e.find(".content"),o),window.disqus_config=function(){this.page.url=location.origin+"/-"+t.route.path,this.page.identifier=t.route.path,this.page.title=document.title}}),i.doneEach(function(i){void 0!==window.DISQUS&&window.DISQUS.reset({reload:!0,config:function(){this.page.url=location.origin+"/-"+t.route.path,this.page.identifier=t.route.path,this.page.title=document.title}})})}location.href=location.href.replace("/-/","/#/"),$docsify.plugins=[].concat(i,$docsify.plugins)}();
+11 -3
View File
@@ -70,14 +70,22 @@ function genIndex (path, content, router, depth) {
return index
}
function search (keywords) {
/**
* @param {String} query
* @returns {Array}
*/
function search (query) {
var matchingResults = [];
var data = [];
Object.keys(INDEXS).forEach(function (key) {
data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; }));
});
keywords = [].concat(keywords, keywords.trim().split(/[\s\-\\\/]+/));
query = query.trim();
var keywords = query.split(/[\s\-\\\/]+/);
if (keywords.length !== 1) {
keywords = [].concat(query, keywords);
}
var loop = function ( i ) {
var post = data[i];
@@ -202,7 +210,7 @@ function doSearch (value) {
var html = '';
matchs.forEach(function (post) {
html += "<div class=\"matching-post\">\n<h2><a href=\"" + (post.url) + "\">" + (post.title) + "</a></h2>\n<p>" + (post.content) + "</p>\n</div>";
html += "<div class=\"matching-post\">\n<a href=\"" + (post.url) + "\"> \n<h2>" + (post.title) + "</h2>\n<p>" + (post.content) + "</p>\n</a>\n</div>";
});
$panel.classList.add('show');
+1 -1
View File
@@ -1 +1 @@
!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(e){var n=[];return h.dom.findAll("a:not([data-nosearch])").map(function(t){var o=t.href,i=t.getAttribute("href"),r=e.parse(o).path;r&&-1===n.indexOf(r)&&!Docsify.util.isAbsolutePath(i)&&n.push(r)}),n}function t(e){localStorage.setItem("docsify.search.expires",Date.now()+e),localStorage.setItem("docsify.search.index",JSON.stringify(g))}function o(e,n,t,o){void 0===n&&(n="");var i,r=window.marked.lexer(n),a=window.Docsify.slugify,s={};return r.forEach(function(n){if("heading"===n.type&&n.depth<=o)i=t.toURL(e,{id:a(n.text)}),s[i]={slug:i,title:n.text,body:""};else{if(!i)return;s[i]?s[i].body?s[i].body+="\n"+(n.text||""):s[i].body=n.text:s[i]={slug:i,title:"",body:""}}}),a.clear(),s}function i(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=[].concat(n,n.trim().split(/[\s\-\\\\/]+/));for(var i=0;i<o.length;i++)!function(i){var r=o[i],a=!1,s="",c=r.title&&r.title.trim(),l=r.body&&r.body.trim(),f=r.slug||"";if(c&&l&&(n.forEach(function(n,t){var o=new RegExp(n,"gi"),i=-1,r=-1;if(i=c&&c.search(o),r=l&&l.search(o),i<0&&r<0)a=!1;else{a=!0,r<0&&(r=0);var f=0,d=0;f=r<11?0:r-10,d=0===f?70:r+n.length+60,d>l.length&&(d=l.length);var p="..."+e(l).substring(f,d).replace(o,'<em class="search-keyword">'+n+"</em>")+"...";s+=p}}),a)){var d={title:e(c),content:s,url:f};t.push(d)}}(i);return t}function r(e,i){h=Docsify;var r="auto"===e.paths,a=localStorage.getItem("docsify.search.expires")<Date.now();if(g=JSON.parse(localStorage.getItem("docsify.search.index")),a)g={};else if(!r)return;var s=r?n(i.router):e.paths,c=s.length,l=0;s.forEach(function(n){if(g[n])return l++;h.get(i.router.getFile(n)).then(function(r){g[n]=o(n,r,i.router,e.depth),c===++l&&t(e.maxAge)})})}function a(){Docsify.dom.style("\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}")}function s(e,n){void 0===n&&(n="");var t='<input type="search" value="'+n+'" /><div class="results-panel"></div></div>',o=Docsify.dom.create("div",t),i=Docsify.dom.find("aside");Docsify.dom.toggleClass(o,"search"),Docsify.dom.before(i,o)}function c(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel");if(!e)return t.classList.remove("show"),void(t.innerHTML="");var o=i(e),r="";o.forEach(function(e){r+='<div class="matching-post">\n<h2><a href="'+e.url+'">'+e.title+"</a></h2>\n<p>"+e.content+"</p>\n</div>"}),t.classList.add("show"),t.innerHTML=r||'<p class="empty">'+y+"</p>"}function l(){var e,n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,"input");Docsify.dom.on(n,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),Docsify.dom.on(t,"input",function(n){clearTimeout(e),e=setTimeout(function(e){return c(n.target.value.trim())},100)})}function f(e,n){var t=Docsify.dom.getNode('.search input[type="search"]');if(t)if("string"==typeof e)t.placeholder=e;else{var o=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];t.placeholder=e[o]}}function d(e,n){if("string"==typeof e)y=e;else{var t=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];y=e[t]}}function p(e,n){var t=n.router.parse().query.s;a(),s(e,t),l(),t&&setTimeout(function(e){return c(t)},500)}function u(e,n){f(e.placeholder,n.route.path),d(e.noData,n.route.path)}var h,g={},y="",m={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,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,m.depth=o.depth||m.depth);var i="auto"===m.paths;e.mounted(function(e){p(m,n),!i&&r(m,n)}),e.doneEach(function(e){u(m,n),i&&r(m,n)})};$docsify.plugins=[].concat(v,$docsify.plugins)}();
!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(e){var n=[];return h.dom.findAll("a:not([data-nosearch])").map(function(t){var o=t.href,i=t.getAttribute("href"),r=e.parse(o).path;r&&-1===n.indexOf(r)&&!Docsify.util.isAbsolutePath(i)&&n.push(r)}),n}function t(e){localStorage.setItem("docsify.search.expires",Date.now()+e),localStorage.setItem("docsify.search.index",JSON.stringify(g))}function o(e,n,t,o){void 0===n&&(n="");var i,r=window.marked.lexer(n),a=window.Docsify.slugify,s={};return r.forEach(function(n){if("heading"===n.type&&n.depth<=o)i=t.toURL(e,{id:a(n.text)}),s[i]={slug:i,title:n.text,body:""};else{if(!i)return;s[i]?s[i].body?s[i].body+="\n"+(n.text||""):s[i].body=n.text:s[i]={slug:i,title:"",body:""}}}),a.clear(),s}function i(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();var i=n.split(/[\s\-\\\\/]+/);1!==i.length&&(i=[].concat(n,i));for(var r=0;r<o.length;r++)!function(n){var r=o[n],a=!1,s="",c=r.title&&r.title.trim(),l=r.body&&r.body.trim(),f=r.slug||"";if(c&&l&&(i.forEach(function(n,t){var o=new RegExp(n,"gi"),i=-1,r=-1;if(i=c&&c.search(o),r=l&&l.search(o),i<0&&r<0)a=!1;else{a=!0,r<0&&(r=0);var f=0,d=0;f=r<11?0:r-10,d=0===f?70:r+n.length+60,d>l.length&&(d=l.length);var p="..."+e(l).substring(f,d).replace(o,'<em class="search-keyword">'+n+"</em>")+"...";s+=p}}),a)){var d={title:e(c),content:s,url:f};t.push(d)}}(r);return t}function r(e,i){h=Docsify;var r="auto"===e.paths,a=localStorage.getItem("docsify.search.expires")<Date.now();if(g=JSON.parse(localStorage.getItem("docsify.search.index")),a)g={};else if(!r)return;var s=r?n(i.router):e.paths,c=s.length,l=0;s.forEach(function(n){if(g[n])return l++;h.get(i.router.getFile(n)).then(function(r){g[n]=o(n,r,i.router,e.depth),c===++l&&t(e.maxAge)})})}function a(){Docsify.dom.style("\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}")}function s(e,n){void 0===n&&(n="");var t='<input type="search" value="'+n+'" /><div class="results-panel"></div></div>',o=Docsify.dom.create("div",t),i=Docsify.dom.find("aside");Docsify.dom.toggleClass(o,"search"),Docsify.dom.before(i,o)}function c(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel");if(!e)return t.classList.remove("show"),void(t.innerHTML="");var o=i(e),r="";o.forEach(function(e){r+='<div class="matching-post">\n<a href="'+e.url+'"> \n<h2>'+e.title+"</h2>\n<p>"+e.content+"</p>\n</a>\n</div>"}),t.classList.add("show"),t.innerHTML=r||'<p class="empty">'+y+"</p>"}function l(){var e,n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,"input");Docsify.dom.on(n,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),Docsify.dom.on(t,"input",function(n){clearTimeout(e),e=setTimeout(function(e){return c(n.target.value.trim())},100)})}function f(e,n){var t=Docsify.dom.getNode('.search input[type="search"]');if(t)if("string"==typeof e)t.placeholder=e;else{var o=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];t.placeholder=e[o]}}function d(e,n){if("string"==typeof e)y=e;else{var t=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];y=e[t]}}function p(e,n){var t=n.router.parse().query.s;a(),s(e,t),l(),t&&setTimeout(function(e){return c(t)},500)}function u(e,n){f(e.placeholder,n.route.path),d(e.noData,n.route.path)}var h,g={},y="",m={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,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,m.depth=o.depth||m.depth);var i="auto"===m.paths;e.mounted(function(e){p(m,n),!i&&r(m,n)}),e.doneEach(function(e){u(m,n),i&&r(m,n)})};$docsify.plugins=[].concat(v,$docsify.plugins)}();
+11 -288
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
+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
+31 -31
View File
@@ -1,9 +1,19 @@
{
"name": "docsify",
"version": "4.3.11",
"version": "4.5.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"dev": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"abbrev": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
@@ -991,8 +1001,8 @@
"integrity": "sha1-4ye1MZThp61dxjR57pCZpSsCSGU=",
"dev": true,
"requires": {
"is-text-path": "1.0.1",
"JSONStream": "1.3.1",
"is-text-path": "1.0.1",
"lodash": "4.17.4",
"meow": "3.7.0",
"split2": "2.1.1",
@@ -2846,11 +2856,6 @@
}
}
},
"string_decoder": {
"version": "0.10.31",
"bundled": true,
"dev": true
},
"string-width": {
"version": "1.0.2",
"bundled": true,
@@ -2861,6 +2866,11 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "0.10.31",
"bundled": true,
"dev": true
},
"stringstream": {
"version": "0.0.5",
"bundled": true,
@@ -3785,16 +3795,6 @@
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
"dev": true
},
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"dev": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"jsx-ast-utils": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz",
@@ -4239,6 +4239,11 @@
"integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=",
"dev": true
},
"medium-zoom": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-0.2.0.tgz",
"integrity": "sha512-2595M4GDwjoyZVDtkw6JWY8JxkhZVumqPjvM8coyRcULPZpoij2bQJ1/syqtx4XiflaqTva0cAch1kzqk0ir9Q=="
},
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
@@ -6500,15 +6505,6 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
"dev": true
},
"string_decoder": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
"dev": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"string-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz",
@@ -6535,6 +6531,15 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
"dev": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@@ -7192,11 +7197,6 @@
"dev": true
}
}
},
"zoom-image": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/zoom-image/-/zoom-image-0.1.4.tgz",
"integrity": "sha1-+q8KgFG7Zya+YM891qM17HPx6Wk="
}
}
}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.3.11",
"version": "4.5.2",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
@@ -20,7 +20,7 @@
"themes"
],
"scripts": {
"bootstrap": "npm i && lerna bootstrap",
"bootstrap": "npm i && lerna bootstrap && npm run build:ssr",
"build": "rm -rf lib themes && node build/build && mkdir lib/themes && mkdir themes && node build/build-css && npm run build:ssr && node build/build-cover",
"dev:build": "rm -rf lib themes && mkdir themes && node build/build --dev && node build/build-css --dev",
"dev": "node app & nodemon -w src -e js,css --exec 'npm run dev:build'",
@@ -31,10 +31,10 @@
},
"dependencies": {
"marked": "^0.3.6",
"medium-zoom": "^0.2.0",
"prismjs": "^1.6.0",
"tinydate": "^1.0.0",
"tweezer.js": "^1.4.0",
"zoom-image": "^0.1.4"
"tweezer.js": "^1.4.0"
},
"devDependencies": {
"conventional-changelog-cli": "^1.3.2",
+1 -1
View File
@@ -37,5 +37,5 @@
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
}
},
"version": "4.3.11"
"version": "4.5.2"
}
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.3.11",
"version": "4.5.2",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
+1 -1
View File
@@ -5,7 +5,7 @@ import { scrollIntoView } from './scroll'
export function eventMixin (proto) {
proto.$resetEvents = function () {
scrollIntoView(this.route.query.id)
scrollIntoView(this.route.path, this.route.query.id)
sidebar.getAndActive(this.router, 'nav')
}
}
+13 -8
View File
@@ -24,7 +24,7 @@ function scrollTo (el) {
.begin()
}
function highlight () {
function highlight (path) {
if (!enableScrollEvent) return
const sidebar = dom.getNode('.sidebar')
const anchors = dom.findAll('.anchor')
@@ -45,7 +45,7 @@ function highlight () {
}
}
if (!last) return
const li = nav[last.getAttribute('data-id')]
const li = nav[getNavKey(path, last.getAttribute('data-id'))]
if (!li || li === active) return
@@ -68,6 +68,10 @@ function highlight () {
}
}
function getNavKey (path, id) {
return `${path}?id=${id}`
}
export function scrollActiveSidebar (router) {
const cover = dom.find('.cover.show')
coverHeight = cover ? cover.offsetHeight : 0
@@ -82,16 +86,17 @@ export function scrollActiveSidebar (router) {
let href = a.getAttribute('href')
if (href !== '/') {
href = router.parse(href).query.id
const { query: { id }, path } = router.parse(href)
if (id) href = getNavKey(path, id)
}
if (href) nav[decodeURIComponent(href)] = li
}
if (isMobile) return
dom.off('scroll', highlight)
dom.on('scroll', highlight)
const path = router.getCurrentPath()
dom.off('scroll', () => highlight(path))
dom.on('scroll', () => highlight(path))
dom.on(sidebar, 'mouseover', () => {
hoverOver = true
})
@@ -100,13 +105,13 @@ export function scrollActiveSidebar (router) {
})
}
export function scrollIntoView (id) {
export function scrollIntoView (path, id) {
if (!id) return
const section = dom.find('#' + id)
section && scrollTo(section)
const li = nav[id]
const li = nav[getNavKey(path, id)]
const sidebar = dom.getNode('.sidebar')
const active = dom.find(sidebar, 'li.active')
active && active.classList.remove('active')
+35 -19
View File
@@ -1,29 +1,31 @@
import { get } from './ajax'
import { callHook } from '../init/lifecycle'
import { getParentPath } from '../router/util'
import { getParentPath, stringifyQuery } from '../router/util'
import { noop } from '../util/core'
import { getAndActive } from '../event/sidebar'
function loadNested (path, file, next, vm, first) {
function loadNested (path, qs, file, next, vm, first) {
path = first ? path : path.replace(/\/$/, '')
path = getParentPath(path)
if (!path) return
get(vm.router.getFile(path + file))
.then(next, _ => loadNested(path, file, next, vm))
get(vm.router.getFile(path + file) + qs).then(next, _ =>
loadNested(path, qs, file, next, vm)
)
}
export function fetchMixin (proto) {
let last
proto._fetch = function (cb = noop) {
const { path } = this.route
const { path, query } = this.route
const qs = stringifyQuery(query, ['id'])
const { loadNavbar, loadSidebar } = this.config
// Abort last request
last && last.abort && last.abort()
last = get(this.router.getFile(path), true)
last = get(this.router.getFile(path) + qs, true)
// Current page is html
this.isHTML = /\.html$/g.test(path)
@@ -31,29 +33,42 @@ export function fetchMixin (proto) {
const loadSideAndNav = () => {
if (!loadSidebar) return cb()
const fn = result => { this._renderSidebar(result); cb() }
const fn = result => {
this._renderSidebar(result)
cb()
}
// Load sidebar
loadNested(path, loadSidebar, fn, this, true)
loadNested(path, qs, loadSidebar, fn, this, true)
}
// Load main content
last.then((text, opt) => {
this._renderMain(text, opt)
loadSideAndNav()
},
_ => {
this._renderMain(null)
loadSideAndNav()
})
last.then(
(text, opt) => {
this._renderMain(text, opt)
loadSideAndNav()
},
_ => {
this._renderMain(null)
loadSideAndNav()
}
)
// Load nav
loadNavbar &&
loadNested(path, loadNavbar, text => this._renderNav(text), this, true)
loadNested(
path,
qs,
loadNavbar,
text => this._renderNav(text),
this,
true
)
}
proto._fetchCover = function () {
const { coverpage } = this.config
const query = this.route.query
const root = getParentPath(this.route.path)
const path = this.router.getFile(root + coverpage)
@@ -63,8 +78,9 @@ export function fetchMixin (proto) {
}
this.coverIsHTML = /\.html$/g.test(path)
get(path)
.then(text => this._renderCover(text))
get(path + stringifyQuery(query, ['id'])).then(text =>
this._renderCover(text)
)
}
proto.$fetch = function (cb = noop) {
+70 -23
View File
@@ -8,6 +8,20 @@ import { isAbsolutePath, getPath } from '../router/util'
import { isFn, merge, cached } from '../util/core'
const cachedLinks = {}
function getAndRemoveConfig (str = '') {
const config = {}
if (str) {
str = str
.replace(/:([\w-]+)=?([\w-]+)?/g, (m, key, value) => {
config[key] = value || true
return ''
})
.trim()
}
return { str, config }
}
export class Compiler {
constructor (config, router) {
@@ -25,9 +39,11 @@ export class Compiler {
if (isFn(mdConf)) {
compile = mdConf(marked, renderer)
} else {
marked.setOptions(merge(mdConf, {
renderer: merge(renderer, mdConf.renderer)
}))
marked.setOptions(
merge(mdConf, {
renderer: merge(renderer, mdConf.renderer)
})
)
compile = marked
}
@@ -91,33 +107,43 @@ export class Compiler {
}
// highlight code
origin.code = renderer.code = function (code, lang = '') {
const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)
const hl = Prism.highlight(
code,
Prism.languages[lang] || Prism.languages.markup
)
return `<pre v-pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
}
origin.link = renderer.link = function (href, title, text) {
let blank = ''
origin.link = renderer.link = function (href, title = '', text) {
let attrs = ''
if (!/:|(\/{2})/.test(href) &&
const { str, config } = getAndRemoveConfig(title)
title = str
if (
!/:|(\/{2})/.test(href) &&
!_self.matchNotCompileLink(href) &&
!/(\s?:ignore)(\s\S+)?$/.test(title)) {
!config.ignore
) {
href = router.toURL(href, null, router.getCurrentPath())
} else {
blank = ` target="${linkTarget}"`
title = title && title.replace(/:ignore/g, '').trim()
attrs += ` target="${linkTarget}"`
}
let target = title && title.match(/:target=\w+/)
if (target) {
target = target[0]
title = title.replace(target, '')
blank = ' ' + target.slice(1)
if (config.target) {
attrs += ' target=' + config.target
}
if (config.disabled) {
attrs += ' disabled'
href = 'javascript:void(0)'
}
if (title) {
title = ` title="${title}"`
attrs += ` title="${title}"`
}
return `<a href="${href}"${title || ''}${blank}>${text}</a>`
return `<a href="${href}"${attrs}>${text}</a>`
}
origin.paragraph = renderer.paragraph = function (text) {
if (/^!&gt;/.test(text)) {
@@ -129,13 +155,33 @@ export class Compiler {
}
origin.image = renderer.image = function (href, title, text) {
let url = href
const titleHTML = title ? ` title="${title}"` : ''
let attrs = ''
const { str, config } = getAndRemoveConfig(title)
title = str
if (config['no-zoom']) {
attrs += ' data-no-zoom'
}
if (title) {
attrs += ` title="${title}"`
}
if (!isAbsolutePath(href)) {
url = getPath(contentBase, href)
}
return `<img src="${url}" data-origin="${href}" alt="${text}"${titleHTML}>`
return `<img src="${url}"data-origin="${href}" alt="${text}"${attrs}>`
}
const CHECKED_RE = /^\[([ x])\] +/
origin.listitem = renderer.listitem = function (text) {
const checked = CHECKED_RE.exec(text)
if (checked) {
text = text.replace(CHECKED_RE, `<input type="checkbox" ${checked[1] === 'x' ? 'checked' : ''} />`)
}
return `<li>${text}</li>\n`
}
renderer.origin = origin
@@ -173,11 +219,12 @@ export class Compiler {
const currentPath = this.router.getCurrentPath()
const { cacheTree, toc } = this
toc[0] && toc[0].ignoreAllSubs && (this.toc = [])
toc[0] && toc[0].ignoreAllSubs && toc.splice(0)
toc[0] && toc[0].level === 1 && toc.shift()
toc.forEach((node, i) => {
node.ignoreSubHeading && toc.splice(i, 1)
})
for (let i = 0; i < toc.length; i++) {
toc[i].ignoreSubHeading && toc.splice(i, 1) && i--
}
const tree = cacheTree[currentPath] || genTree(toc, level)
+1 -1
View File
@@ -55,7 +55,7 @@ export class HashHistory extends History {
let query = ''
const hashIndex = path.indexOf('#')
if (hashIndex) {
if (hashIndex >= 0) {
path = path.slice(hashIndex + 1)
}
+2 -1
View File
@@ -22,10 +22,11 @@ export function parseQuery (query) {
return res
}
export function stringifyQuery (obj) {
export function stringifyQuery (obj, ignores = []) {
const qs = []
for (const key in obj) {
if (ignores.indexOf(key) > -1) continue
qs.push(
obj[key]
? `${encode(key)}=${encode(obj[key])}`.toLowerCase()
+2 -1
View File
@@ -17,7 +17,8 @@ function tpl (id, options) {
scrolling=0
frameborder=0
width=250
height=250
height=auto
style="max-height: 250px;"
id="code-sponsor-embed-iframe"
src="https://app.codesponsor.io/widgets/${id}?${qs.join('&')}">
</iframe>`
+48
View File
@@ -0,0 +1,48 @@
location.href = location.href.replace('/-/', '/#/')
function install (hook, vm) {
const dom = Docsify.dom
const disqus = vm.config.disqus
if (!disqus) {
throw Error('$docsify.disqus is required')
}
hook.init(_ => {
const script = dom.create('script')
script.async = true
script.src = `https://${disqus}.disqus.com/embed.js`
script.setAttribute('data-timestamp', +new Date())
dom.appendTo(dom.body, script)
})
hook.mounted(_ => {
const div = dom.create('div')
div.id = 'disqus_thread'
const main = dom.getNode('#main')
div.style = `width: ${main.clientWidth}px; margin: 0 auto 20px;`
dom.appendTo(dom.find('.content'), div)
// eslint-disable-next-line
window.disqus_config = function() {
this.page.url = location.origin + '/-' + vm.route.path
this.page.identifier = vm.route.path
this.page.title = document.title
}
})
hook.doneEach(_ => {
if (typeof window.DISQUS !== 'undefined') {
window.DISQUS.reset({
reload: true,
config: function () {
this.page.url = location.origin + '/-' + vm.route.path
this.page.identifier = vm.route.path
this.page.title = document.title
}
})
}
})
}
$docsify.plugins = [].concat(install, $docsify.plugins)
+3 -1
View File
@@ -94,8 +94,10 @@ function doSearch (value) {
let html = ''
matchs.forEach(post => {
html += `<div class="matching-post">
<h2><a href="${post.url}">${post.title}</a></h2>
<a href="${post.url}">
<h2>${post.title}</h2>
<p>${post.content}</p>
</a>
</div>`
})
+10 -2
View File
@@ -65,14 +65,22 @@ export function genIndex (path, content = '', router, depth) {
return index
}
export function search (keywords) {
/**
* @param {String} query
* @returns {Array}
*/
export function search (query) {
const matchingResults = []
let data = []
Object.keys(INDEXS).forEach(key => {
data = data.concat(Object.keys(INDEXS[key]).map(page => INDEXS[key][page]))
})
keywords = [].concat(keywords, keywords.trim().split(/[\s\-\\\/]+/))
query = query.trim()
let keywords = query.split(/[\s\-\\\/]+/)
if (keywords.length !== 1) {
keywords = [].concat(query, keywords)
}
for (let i = 0; i < data.length; i++) {
const post = data[i]
+5 -13
View File
@@ -1,22 +1,14 @@
import zoom from 'zoom-image'
import style from 'zoom-image/css/zoom-image.css'
import mediumZoom from 'medium-zoom'
function install (hook) {
const dom = Docsify.dom
let destroys
// add style
dom.appendTo(dom.head, dom.create('style', style))
let zoom
hook.doneEach(_ => {
const images = dom.findAll('img:not(.emoji)')
if (Array.isArray(destroys) && destroys.length) {
destroys.forEach(o => o())
destroys = []
if (zoom) {
zoom.detach()
}
destroys = images.map(zoom)
zoom = mediumZoom('img:not(.emoji):not([data-no-zoom])')
})
}
+15 -5
View File
@@ -52,6 +52,7 @@ div#app {
.search .search-keyword {
color: var(--theme-color, $color-primary);
font-style: normal;
font-weight: bold;
}
html,
@@ -74,6 +75,11 @@ img {
max-width: 100%;
}
a[disabled] {
cursor: not-allowed;
opacity: 0.6;
}
kbd {
border: solid 1px #ccc;
border-radius: 3px;
@@ -85,6 +91,11 @@ kbd {
vertical-align: middle;
}
li input[type=checkbox] {
margin: 0 0.2em 0.25em -1.6em;
vertical-align: middle;
}
/* navbar */
.app-nav {
left: 0;
@@ -206,6 +217,7 @@ main {
display: block;
position: relative;
size: 100vw 100%;
z-index: 0;
}
.anchor {
@@ -226,7 +238,7 @@ main {
.sidebar {
border-right: 1px solid rgba(0, 0, 0, 0.07);
overflow-y: auto;
padding: 40px 0;
padding: 40px 0 0;
position: absolute 0 * 0 0;
transition: transform 250ms ease-out;
width: $sidebar-width;
@@ -251,6 +263,7 @@ main {
.sidebar-nav {
line-height: 2em;
padding-bottom: 40px;
}
ul {
@@ -443,10 +456,7 @@ body.close {
@media print {
.github-corner,
.sidebar-toggle,
.sidebar {
display: none;
}
.sidebar,
.app-nav {
display: none;
}
+3 -4
View File
@@ -47,10 +47,11 @@ body {
}
.app-sub-sidebar {
.section-link {
li {
&::before {
content: '-';
padding-right: 4px;
float: left;
}
}
}
@@ -99,9 +100,7 @@ body {
}
.markdown-section figure,
.markdown-section p,
.markdown-section ul,
.markdown-section ol {
.markdown-section p {
margin: 1.2em 0;
}