Skip to content

Commit 04d9620

Browse files
authored
feat: image bi-directional link (#89)
* feat: image bi-directional link * fix: incorrect token implementation * docs: added docs
1 parent e38ff26 commit 04d9620

11 files changed

Lines changed: 142 additions & 37 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
All images are provided by [Lorem Picsum](https://picsum.photos/) - The Lorem Ipsum for photos.
594 KB
Loading
679 KB
Loading
679 KB
Loading

‎docs/pages/en/integrations/markdown-it-bi-directional-links/index.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Obsidian same name pages: [[pages/en/integrations/markdown-it-bi-directional-lin
1212

1313
Absolute Path: [[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page]]
1414

15+
Images are supported:
16+
17+
![[foxtail field.jpg]]
18+
1519
## Introduction
1620

1721
**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/).
@@ -35,6 +39,16 @@ Demo
3539

3640
[[Bi-directional Links Example Page]]
3741

42+
##### Image
43+
44+
```markdown
45+
![[foxtail field.jpg]]
46+
```
47+
48+
Demo
49+
50+
![[foxtail field.jpg]]
51+
3852
#### Custom Text
3953

4054
```markdown
@@ -79,6 +93,26 @@ Demo
7993

8094
[[pages/en/integrations/markdown-it-bi-directional-links/Bi-directional Links Example Page]]
8195

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+
82116
### Absolute path with custom text
83117

84118
```markdown
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
All images are provided by [Lorem Picsum](https://picsum.photos/) - The Lorem Ipsum for photos.
679 KB
Loading
594 KB
Loading
679 KB
Loading

‎docs/pages/zh-CN/integrations/markdown-it-bi-directional-links/index.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Obsidian 同名页面:[[pages/zh-CN/integrations/markdown-it-bi-directional-li
1212

1313
绝对路径:[[pages/zh-CN/integrations/markdown-it-bi-directional-links/双向链接示例页面]]
1414

15+
图片也支持的:
16+
17+
![[一片 狗尾草.jpg]]
18+
1519
## 介绍
1620

1721
**双向链接** (也被称之为内部链接,英文 Bi-directional links 和 Internal links),和也许你也了解和听说过另一个有关的概念 [WikiLinks](https://en.wikipedia.org/wiki/Help:Link),在文档工程中有着非常重要的地位,它通常用于快速的建立一个页面到另一个页面的连接(或者链接),在 [Wikipedia](https://wikipedia.org) 这样的 Wiki 框架中,以及现在所流行的 [Obsidian](https://obsidian.md/) 和 [Logseq](https://logseq.com/) 中都被广泛使用。
@@ -35,6 +39,16 @@ Obsidian 同名页面:[[pages/zh-CN/integrations/markdown-it-bi-directional-li
3539

3640
[[双向链接示例页面]]
3741

42+
##### 图片
43+
44+
```markdown
45+
![[一片 狗尾草.jpg]]
46+
```
47+
48+
效果
49+
50+
![[一片 狗尾草.jpg]]
51+
3852
#### 改显示的文案
3953

4054
```markdown
@@ -79,6 +93,26 @@ Obsidian 同名页面:[[pages/zh-CN/integrations/markdown-it-bi-directional-li
7993

8094
[[pages/zh-CN/integrations/markdown-it-bi-directional-links/双向链接示例页面]]
8195

96+
#### 图片
97+
98+
```markdown
99+
![[zh-CN/integrations/markdown-it-bi-directional-links/images/海滩铁轨 同名图片.jpg]]
100+
```
101+
102+
效果
103+
104+
![[pages/zh-CN/integrations/markdown-it-bi-directional-links/images/海滩铁轨 同名图片.jpg]]
105+
106+
它与同名图片是可以区分的:
107+
108+
```markdown
109+
![[zh-CN/integrations/markdown-it-bi-directional-links/images/same-name/海滩铁轨 同名图片.jpg]]
110+
```
111+
112+
效果
113+
114+
![[pages/zh-CN/integrations/markdown-it-bi-directional-links/images/same-name/海滩铁轨 同名图片.jpg]]
115+
82116
#### 绝对路径和自定义文案
83117

84118
```markdown

0 commit comments

Comments
 (0)