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
Custom text: [[Bi-directional Links Example Page|Custom Text]]
8
-
9
-
Compatible to modify the HTML attributes [[Bi-directional Links Example Page|Custom Attrs]]{style="color: red;"}
10
-
11
-
Obsidian same name pages: [[pages/en/integrations/markdown-it-bi-directional-links/same-name/Bi-directional Links Example Same Name Page|Bi-directional Links Example Same Name Page]] 和 [[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Same Name Page|Bi-directional Links Example Same Name Page]]
12
-
13
-
Absolute Path: [[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page]]
14
-
15
-
Images are supported:
16
-
17
-
![[foxtail field.jpg]]
18
-
19
3
## Introduction
20
4
21
5
**Bi-directional links** (also known as internal links), and another concept you may know and hear about [WikiLinks](https://en.wikipedia.org/wiki/Help:Link), holds a important place in the document engineering area. It is usually used to quickly establish a connection (or link) from one page to another page, and widely used in Wiki pages such as [Wikipedia](https://wikipedia.org), and now days popular tools such as [Obsidian](https://obsidian.md/) and [Logseq](https://logseq.com/).
@@ -25,135 +9,47 @@ This plugin is a fully featured compatible implementation version of [Obsidian](
25
9
1. A page's file name (without extension) can be used as a link target, for example: `[[Bi-directional Links Example Page]]` will be parsed as a link to the globally unique `Bi-directional Links Example Page.md` file.
26
10
2. A link target can be an absolute path, for example: `[[Some Folder/Bi-directional Links Example Page]]` will be parsed as a link to `Some Folder/Bi-directional Links Example Page.md`, usually appears when you have multiple files with the same name.
You can discover more syntaxes and features in the [Syntax](/pages/en/integrations/markdown-it-bi-directional-links/syntax).
36
+
:::
31
37
32
-
#### Basic
38
+
Basic: [[Bi-directional Links Example Page]]
33
39
34
-
```markdown
35
-
[[Target Page File Name]]
36
-
```
37
-
38
-
Demo
40
+
Custom text: [[Bi-directional Links Example Page|Custom Text]]
39
41
40
-
[[Bi-directional Links Example Page]]
42
+
Compatible to modify the HTML attributes [[Bi-directional Links Example Page|Custom Attrs]]{style="color: red;"}
41
43
42
-
##### Image
44
+
Obsidian same name pages: [[pages/en/integrations/markdown-it-bi-directional-links/same-name/Bi-directional Links Example Same Name Page|Bi-directional Links Example Same Name Page]] 和 [[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Same Name Page|Bi-directional Links Example Same Name Page]]
43
45
44
-
```markdown
45
-
![[foxtail field.jpg]]
46
-
```
46
+
Absolute Path: [[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page]]
47
47
48
-
Demo
48
+
Images are supported:
49
49
50
50
![[foxtail field.jpg]]
51
51
52
-
#### Custom Text
53
-
54
-
```markdown
55
-
[[Target Page File Name|Custom Text]]
56
-
```
57
-
58
-
Demo
59
-
60
-
[[Bi-directional Links Example Page|Custom Text]]
61
-
62
-
#### Compatible with [`markdown-it-attrs`](https://github.com/arve0/markdown-it-attrs) to modify HTML attributes
63
-
64
-
<br>
65
-
66
-
##### Change color
67
-
68
-
```markdown
69
-
[[Target Page File Name]]{style="color: red;"}
70
-
```
71
-
72
-
Demo
73
-
74
-
[[Bi-directional Links Example Page]]{style="color: red;"}
75
-
76
-
##### Change class name
77
-
78
-
```markdown
79
-
[[Target Page File Name]]{.custom-class}
80
-
```
81
-
82
-
Demo
83
-
84
-
[[Bi-directional Links Example Page]]{.custom-class}
85
-
86
-
### Absolute path
87
-
88
-
```markdown
89
-
[[Some Full Path Reference to Your Page]]
90
-
```
91
-
92
-
Demo
93
-
94
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page]]
95
-
96
-
#### Image
97
-
98
-
```markdown
99
-
![[en/integrations/markdown-it-bi-directional-links/images/railway near by beach same name.jpg]]
100
-
```
101
-
102
-
Demo
103
-
104
-
![[pages/en/integrations/markdown-it-bi-directional-links/images/railway near by beach same name.jpg]]
105
-
106
-
And it is distinguishable to the pictures with the same name:
107
-
108
-
```markdown
109
-
![[en/integrations/markdown-it-bi-directional-links/images/same-name/railway near by beach same name.jpg]]
110
-
```
111
-
112
-
Demo
113
-
114
-
![[pages/en/integrations/markdown-it-bi-directional-links/images/same-name/railway near by beach same name.jpg]]
115
-
116
-
### Absolute path with custom text
117
-
118
-
```markdown
119
-
[[Some Full Path Reference to Your Page|Custom Text]]
120
-
```
121
-
122
-
Demo
123
-
124
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|Custom Text]]
125
-
126
-
### Use Markdown markup in custom text
127
-
128
-
```markdown
129
-
[[Some Full Path Reference to Your Page|`Code Block (Before)` Middle `Code Block (After)`]]
130
-
131
-
[[Some Full Path Reference to Your Page|**Bold Before** Middle **Bold After**]]
132
-
133
-
[[Some Full Path Reference to Your Page|*Italic Before* Middle *After*]]
134
-
135
-
[[Some Full Path Reference to Your Page|~~Strikethrough Before~~ Middle ~~Strikethrough After~~]]
136
-
137
-
[[Some Full Path Reference to Your Page|<spanstyle="color: red;">Custom HTML</span>]]
138
-
139
-
[[Some Full Path Reference to Your Page|<spanstyle="color: red;">Custom HTML (Before)</span> Middle <spanstyle="color: blue;">Custom HTML (After)</span>]]
140
-
```
141
-
142
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|`Code Block (Before)` Middle `Code Block (After)`]]
143
-
144
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|**Bold (Before)** Middle **Bold (After)**]]
145
-
146
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|*Italic (Before)* Middle *Italic (After)*]]
147
-
148
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|~~Strikethrough (Before)~~ Middle ~~Strikethrough (After)~~]]
149
-
150
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|<spanstyle="color: red;">Custom HTML</span>]]
151
-
152
-
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page|<spanstyle="color: red;">Custom HTML</span> Middle <spanstyle="color: blue;">Custom HTML</span>]]
153
-
154
-
## How to use
155
-
156
-
### Installation
52
+
## Installation
157
53
158
54
Install `@nolebase/markdown-it-bi-directional-links` to your project dependencies by running the following command:
In the VitePress configuration file (usually `docs/.vitepress/config.ts`, the file path and extension may be different), import `@nolebase/markdown-it-bi-directional-links` as a plugin, and use it as a `markdown-it` plugin in the `markdown` option:
0 commit comments