Some content is hidden

Large Commits have some content hidden by default. Use the searcx below for content that may be hidden.

74 files changed

+4964
-3036
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.eslintignore
2-
.eslintrc.cjs
32
.
43
.gitignore
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ dist
44
lib
55

66
# Files
7+
_vars.css
8+
_vars-advanced.css
79
CHANGELOG.md
810
emoji-data.*
9-
HISTORY.md
11+
HISTORY.md
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## docsify
1+
# docsify
22

33
> A magical documentation site generator.
44
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
<!-- markdownlint-disable first-line-h1 -->
2+
13
![logo](_media/icon.svg)
24

35
# docsify <small>4.13.0</small>
46

5-
> A magical documentation site generator.
7+
> A magical documentation site generator
68
79
- Simple and lightweight
8-
- No statically built html files
10+
- No statically built HTML files
911
- Multiple themes
1012

13+
[Get Started](#docsify)
1114
[](https://.com/docsifyjs/docsify/)
12-
[Getting Started](#docsify)
15+
16+
<!-- ![color](#f0f0f0) -->
17+
<!-- ![](/_media/icon.svg) -->
Original file line numberDiff line numberDiff 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+
#4158d0 0%,
14+
#c850c0 46%,
15+
#ffcc70 100%
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 numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
<!-- markdownlint-disable first-line-h1 -->
2+
13
- Translations
4+
25
- [English](/)
36
- [简体中文](/zh-cn/)
47
- [Deutsch](/de-de/)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
<!-- markdownlint-disable first-line-h1 -->
2+
13
- Getting started
24

35
- [Quick start](quickstart.md)
4-
- [Writing more pages](more-pages.md)
5-
- [Custom navbar](custom-navbar.md)
6+
- [Adding pages](adding-pages.md)
67
- [Cover page](cover.md)
8+
- [Custom navbar](custom-navbar.md)
79

810
- Customization
911

@@ -23,6 +25,7 @@
2325
- [CDN](cdn.md)
2426
- [Offline Mode (PWA)](pwa.md)
2527
- [Embed Files](embed-files.md)
28+
- [UI Kit](ui-kit.md)
2629

2730
- [Awesome docsify](awesome.md)
2831
- [Changelog](changelog.md)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# More pages
1+
# Adding pages
22

33
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`.
44

@@ -46,7 +46,23 @@ Create the `_sidebar.md`:
4646
<!-- docs/_sidebar.md -->
4747

4848
- [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)
5066
```
5167

5268
You need to create a `.nojekyll` in `./docs` to prevent Pages from ignoring files that begin with an underscore.
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ window.$docsify = {
376376

377377
Website logo as it appears in the sidebar. You can resize it using CSS.
378378

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.
380380

381381
```js
382382
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
917917

918918
For more details, see [#1131](https://.com/docsifyjs/docsify/issues/1131).
919919

920-
## themeColor (_deprecated_)
920+
## themeColor ⚠️
921921

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.
931923

932924
- Type: `String`
933925

@@ -939,16 +931,18 @@ window.$docsify = {
939931
};
940932
```
941933

942-
## topMargin
934+
## topMargin ⚠️
943935

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`
945939
- Default: `0`
946940

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.
948942

949943
```js
950944
window.$docsify = {
951-
topMargin: 90, // default: 0
945+
topMargin: 90, // 90, '90px', '2rem', etc.
952946
};
953947
```
954948

Original file line numberDiff line numberDiff line change
@@ -6,58 +6,61 @@ Activate the cover feature by setting `coverpage` to **true**. See [coverpage co
66

77
Set `coverpage` to **true**, and create a `_coverpage.md`:
88

9-
```html
10-
<!-- index.html -->
11-
12-
<script>
13-
window.$docsify = {
14-
coverpage: true,
15-
};
16-
</script>
17-
<script src="//cdn.jsdelivr.net/npm/docsify@5/dist/docsify.min.js"></script>
9+
```js
10+
window.$docsify = {
11+
coverpage: true,
12+
};
1813
```
1914

2015
```markdown
2116
<!-- _coverpage.md -->
2217

2318
![logo](_media/icon.svg)
2419

25-
# docsify <small>3.5</small>
20+
# docsify
2621

27-
> A magical documentation site generator.
22+
> A magical documentation site generator
2823

2924
- Simple and lightweight
30-
- No statically built html files
25+
- No statically built HTML files
3126
- Multiple themes
3227

3328
[](https://.com/docsifyjs/docsify/)
3429
[Get Started](#docsify)
3530
```
3631

37-
## Custom background
32+
## Customization
3833

39-
The background color is generated randomly by default. You can customize the background color or a background image:
34+
The cover page can be customized using [theme properties](themes#theme-properties):
4035

41-
```markdown
42-
<!-- _coverpage.md -->
36+
<!-- prettier-ignore -->
37+
```css
38+
:root {
39+
--cover-bg : url('path/to/image.png');
40+
--cover-bg-overlay : rgba(0, 0, 0, 0.5);
41+
--cover-color : #fff;
42+
--cover-title-color: var(--theme-color);
43+
--cover-title-font : 600 var(--font-size-xxxl) var(--font-family);
44+
}
45+
```
4346

44-
# docsify <small>3.5</small>
47+
Alternatively, a background color or image can be specified in the cover page markdown.
4548

46-
[](https://.com/docsifyjs/docsify/)
47-
[Get Started](#quick-start)
49+
```markdown
50+
<!-- background color -->
4851

52+
![color](#f0f0f0)
53+
```
54+
55+
```markdown
4956
<!-- background image -->
5057

5158
![](_media/bg.png)
52-
53-
<!-- background color -->
54-
55-
![color](#f0f0f0)
5659
```
5760

5861
## Coverpage as homepage
5962

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.
6164

6265
## Multiple covers
6366

Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ Alternatively, you can create a custom markdown-based navigation file by setting
4040
- [chinese](/zh-cn/)
4141
```
4242

43+
To create drop-down menus:
44+
45+
```markdown
46+
<!-- _navbar.md -->
47+
48+
- Translations
49+
50+
- [En](/)
51+
- [chinese](/zh-cn/)
52+
```
53+
4354
!> You need to create a `.nojekyll` in `./docs` to prevent Pages from ignoring files that begin with an underscore.
4455

4556
`_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.
5970
- [Cover page](cover.md)
6071

6172
- Configuration
73+
6274
- [Configuration](configuration.md)
6375
- [Themes](themes.md)
6476
- [Using plugins](plugins.md)

0 commit comments

Comments
 (0)