You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/helpers.md
+56-22Lines changed: 56 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,72 +6,106 @@ docsify extends Markdown syntax to make your documents more readable.
6
6
7
7
## Callouts
8
8
9
-
### Important content
9
+
Docsify supports [GitHub style](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) callouts (also known as "admonitions" or "alerts").
10
10
11
-
Important content like:
11
+
<!-- prettier-ignore -->
12
+
> [!CAUTION]
13
+
> **Caution** callouts communicate negative potential consequences of an action.
12
14
13
-
```markdown
14
-
!> **Time** is money, my friend!
15
-
```
15
+
<!-- prettier-ignore -->
16
+
> [!IMPORTANT]
17
+
> **Important** callouts communicate information necessary for users to succeed.
16
18
17
-
is rendered as:
19
+
<!-- prettier-ignore -->
20
+
> [!NOTE]
21
+
> **Note** callouts communicate information that users should take into account.
18
22
19
-
!> **Time** is money, my friend!
23
+
<!-- prettier-ignore -->
24
+
> [!TIP]
25
+
> **Tip** callouts communicate optional information to help a user be more successful.
20
26
21
-
### Tips
27
+
<!-- prettier-ignore -->
28
+
> [!WARNING]
29
+
> **Warning** callouts communicate potential risks user should be aware of.
22
30
23
-
General tips like:
31
+
**Markdown**
24
32
33
+
<!-- prettier-ignore -->
25
34
```markdown
26
-
?> _TODO_ unit test
35
+
> [!CAUTION]
36
+
> **Caution** callouts communicate negative potential consequences of an action.
37
+
38
+
> [!IMPORTANT]
39
+
> **Important** callouts communicate information necessary for users to succeed.
40
+
41
+
> [!NOTE]
42
+
> **Note** callouts communicate information that users should take into account.
43
+
44
+
> [!TIP]
45
+
> **Tip** callouts communicate optional information to help a user be more successful.
46
+
47
+
> [!WARNING]
48
+
> **Warning** callouts communicate potential risks user should be aware of.
27
49
```
28
50
29
-
are rendered as:
51
+
### Legacy Style ⚠️
30
52
31
-
?> _TODO_ unit test
53
+
The following Docsify v4 callout syntax has been deprecated and will be removed in a future version.
54
+
55
+
!> **Important** callouts communicate information necessary for users to succeed.
56
+
57
+
?> **Tip** callouts communicate optional information to help a user be more successful.
58
+
59
+
**Markdown**
60
+
61
+
```markdown
62
+
!> **Important** callouts communicate information necessary for users to succeed.
63
+
64
+
?> **Tip** callouts communicate optional information to help a user be more successful.
65
+
```
32
66
33
67
## Link attributes
34
68
35
69
### disabled
36
70
37
-
```md
71
+
```markdown
38
72
[link](/demo ':disabled')
39
73
```
40
74
41
75
### href
42
76
43
77
Sometimes we will use some other relative path for the link, and we have to tell docsify that we don't need to compile this link. For example:
44
78
45
-
```md
79
+
```markdown
46
80
[link](/demo/)
47
81
```
48
82
49
83
It will be compiled to `<a href="/#/demo/">link</a>` and will load `/demo/README.md`. Maybe you want to jump to `/demo/index.html`.
50
84
51
85
Now you can do that
52
86
53
-
```md
87
+
```markdown
54
88
[link](/demo/ ':ignore')
55
89
```
56
90
57
91
You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set the title for the link.
58
92
59
-
```md
93
+
```markdown
60
94
[link](/demo/ ':ignore title')
61
95
62
96
<a href="/demo/" title="title">link</a>
63
97
```
64
98
65
99
### target
66
100
67
-
```md
101
+
```markdown
68
102
[link](/demo ':target=_blank')
69
103
[link](/demo2 ':target=_self')
70
104
```
71
105
72
106
## Task lists
73
107
74
-
```md
108
+
```markdown
75
109
- [ ] foo
76
110
- bar
77
111
- [x] baz
@@ -91,19 +125,19 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set th
0 commit comments