Large Commits have some content hidden by default. Use the searcx below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
74 files changed
+4964
-3036
lines changed
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,3 @@
1
1
.eslintignore
2
-
.eslintrc.cjs
3
2
.
4
3
.gitignore
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ dist
4
4
lib
5
5
6
6
# Files
7
+
_vars.css
8
+
_vars-advanced.css
7
9
CHANGELOG.md
8
10
emoji-data.*
9
-
HISTORY.md
11
+
HISTORY.md
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
##docsify
1
+
# docsify
2
2
3
3
> A magical documentation site generator.
4
4
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,17 @@
1
+
<!-- markdownlint-disable first-line-h1 -->
2
+
1
3

2
4
3
5
# docsify <small>4.13.0</small>
4
6
5
-
> A magical documentation site generator.
7
+
> A magical documentation site generator
6
8
7
9
- Simple and lightweight
8
-
- No statically built html files
10
+
- No statically built HTML files
9
11
- Multiple themes
10
12
13
+
[Get Started](#docsify)
11
14
[](https://.com/docsifyjs/docsify/)
12
-
[Getting Started](#docsify)
15
+
16
+
<!--  -->
17
+
<!--  -->
Original file line number
Diff line number
Diff line change
@@ -1 +1,31 @@
1
-
<h1>To infinity and Beyond!</h1>
1
+
<style>
2
+
html,
3
+
body {
4
+
margin:0;
5
+
padding:0;
6
+
min-height:100%;
7
+
}
8
+
9
+
body {
10
+
background-color:#4158d0;
11
+
background-image:linear-gradient(
12
+
43deg,
13
+
#4158d00%,
14
+
#c850c046%,
15
+
#ffcc70100%
16
+
);
17
+
color:#fff;
18
+
font-family: sans-serif;
19
+
}
20
+
21
+
main {
22
+
display: flex;
23
+
justify-content: center;
24
+
align-items: center;
25
+
height:100vh;
26
+
}
27
+
</style>
28
+
29
+
<main>
30
+
<p>Example HTML Page</p>
31
+
</main>
Loading
Loading
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
+
<!-- markdownlint-disable first-line-h1 -->
2
+
1
3
- Translations
4
+
2
5
-[English](/)
3
6
-[简体中文](/zh-cn/)
4
7
-[Deutsch](/de-de/)
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
+
<!-- markdownlint-disable first-line-h1 -->
2
+
1
3
- Getting started
2
4
3
5
-[Quick start](quickstart.md)
4
-
-[Writing more pages](more-pages.md)
5
-
-[Custom navbar](custom-navbar.md)
6
+
-[Adding pages](adding-pages.md)
6
7
-[Cover page](cover.md)
8
+
-[Custom navbar](custom-navbar.md)
7
9
8
10
- Customization
9
11
@@ -23,6 +25,7 @@
23
25
-[CDN](cdn.md)
24
26
-[Offline Mode (PWA)](pwa.md)
25
27
-[Embed Files](embed-files.md)
28
+
-[UI Kit](ui-kit.md)
26
29
27
30
-[Awesome docsify](awesome.md)
28
31
-[Changelog](changelog.md)
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# More pages
1
+
# Adding pages
2
2
3
3
If you need more pages, you can simply create more markdown files in your docsify directory. If you create a file named `guide.md`, then it is accessible via `/#/guide`.
4
4
@@ -46,7 +46,23 @@ Create the `_sidebar.md`:
46
46
<!-- docs/_sidebar.md -->
47
47
48
48
- [Home](/)
49
-
- [Guide](guide.md)
49
+
- [Page 1](page-1.md)
50
+
```
51
+
52
+
To create section headers:
53
+
54
+
```markdown
55
+
<!-- docs/_sidebar.md -->
56
+
57
+
- Section Header 1
58
+
59
+
- [Home](/)
60
+
- [Page 1](page-1.md)
61
+
62
+
- Section Header 2
63
+
64
+
- [Page 2](page-2.md)
65
+
- [Page 3](page-3.md)
50
66
```
51
67
52
68
You need to create a `.nojekyll` in `./docs` to prevent Pages from ignoring files that begin with an underscore.
Original file line number
Diff line number
Diff line change
@@ -376,7 +376,7 @@ window.$docsify = {
376
376
377
377
Website logo as it appears in the sidebar. You can resize it using CSS.
378
378
379
-
!> Logo will only bee visible if `name` prop is also set. See [name](#name) configuration.
379
+
!> Logo will only be visible if `name` prop is also set. See [name](#name) configuration.
380
380
381
381
```js
382
382
window.$docsify= {
@@ -917,17 +917,9 @@ If you have a link to the homepage in the sidebar and want it to be shown as act
917
917
918
918
For more details, see [#1131](https://.com/docsifyjs/docsify/issues/1131).
919
919
920
-
## themeColor (_deprecated_)
920
+
## themeColor ⚠️
921
921
922
-
> **Warning** Deprecated. Use the CSS var `--theme-color` in your `<style>` sheet. Example:
923
-
>
924
-
> ```html
925
-
> <style>
926
-
>:root {
927
-
> --theme-color: deeppink;
928
-
> }
929
-
></style>
930
-
> ```
922
+
!> Deprecated as of v5. Use the `--theme-color`[theme property](themes#theme-properties) to [customize](themes#customization) your theme color.
931
923
932
924
- Type: `String`
933
925
@@ -939,16 +931,18 @@ window.$docsify = {
939
931
};
940
932
```
941
933
942
-
## topMargin
934
+
## topMargin ⚠️
943
935
944
-
- Type: `Number`
936
+
!> Deprecated as of v5. Use the `--scroll-padding-top`[theme property](themes#theme-properties) to specify a scroll margin when using a sticky navbar.
937
+
938
+
- Type: `Number|String`
945
939
- Default: `0`
946
940
947
-
Adds a space on top when scrolling the content page to reach the selected section. This is useful in case you have a _sticky-header_ layout and you want to align anchors to the end of your header.
941
+
Adds scroll padding to the top of the viewport. This is useful when you have added a sticky or "fixed" element and would like auto scrolling to align with the bottom of your element.
948
942
949
943
```js
950
944
window.$docsify= {
951
-
topMargin:90, //default: 0
945
+
topMargin:90, //90, '90px', '2rem', etc.
952
946
};
953
947
```
954
948
Original file line number
Diff line number
Diff line change
@@ -6,58 +6,61 @@ Activate the cover feature by setting `coverpage` to **true**. See [coverpage co
6
6
7
7
Set `coverpage` to **true**, and create a `_coverpage.md`:
Alternatively, a background color or image can be specified in the cover page markdown.
45
48
46
-
[](https://.com/docsifyjs/docsify/)
47
-
[Get Started](#quick-start)
49
+
```markdown
50
+
<!-- background color -->
48
51
52
+

53
+
```
54
+
55
+
```markdown
49
56
<!-- background image -->
50
57
51
58

52
-
53
-
<!-- background color -->
54
-
55
-

56
59
```
57
60
58
61
## Coverpage as homepage
59
62
60
-
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [onlyCover option](configuration.md#onlycover).
63
+
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [`onlyCover`](configuration.md#onlycover) option.
61
64
62
65
## Multiple covers
63
66
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,17 @@ Alternatively, you can create a custom markdown-based navigation file by setting
40
40
- [chinese](/zh-cn/)
41
41
```
42
42
43
+
To create drop-down menus:
44
+
45
+
```markdown
46
+
<!-- _navbar.md -->
47
+
48
+
- Translations
49
+
50
+
- [En](/)
51
+
- [chinese](/zh-cn/)
52
+
```
53
+
43
54
!> You need to create a `.nojekyll` in `./docs` to prevent Pages from ignoring files that begin with an underscore.
44
55
45
56
`_navbar.md` is loaded from each level directory. If the current directory doesn't have `_navbar.md`, it will fall back to the parent directory. If, for example, the current path is `/guide/quick-start`, the `_navbar.md` will be loaded from `/guide/_navbar.md`.
@@ -59,6 +70,7 @@ You can create sub-lists by indenting items that are under a certain parent.
0 commit comments