Skip to content

Commit 6b22f22

Browse files
authored
Ch05: fix filesystem structure figure to mermaid.js drawing for dark mode (#75)
1 parent 43db36e commit 6b22f22

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

docs/Ch05/index.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,44 @@ drwxrwxr-x 2 ustc ustc 4096 Feb 3 22:38 a_folder
317317

318318
而 UNIX 系列采用了一种不一样的思路组织文件:整个系统的文件都从 `/`(根目录)开始,像一棵树一样,类似于下图。
319319

320-
![Unix 下的文件系统结构简图](assets/unix_filesystem.png)
320+
```mermaid
321+
graph LR
322+
/ --> bin
323+
/ --> boot
324+
/ --> dev
325+
/ --> etc
326+
/ --> home
327+
/ --> mnt
328+
/ --> opt
329+
/ --> proc
330+
/ --> root
331+
/ --> usr
332+
/ --> var
333+
/ --> tmp
334+
335+
bin --> ls
336+
bin --> cp
337+
338+
dev --> zero
339+
dev --> null
340+
341+
home --> zhangsan
342+
home --> lisi
343+
344+
zhangsan --> code
345+
zhangsan --> tools
346+
347+
lisi --> music
348+
lisi --> docs
349+
350+
mnt --> windows_disk
351+
subgraph mount
352+
windows_disk --> Windows
353+
windows_disk --> Users
354+
end
355+
356+
usr --> usrbin[bin]
357+
```
321358

322359
其他的分区以挂载 (mount) 的形式「挂」在了这棵树上,如图中的 `/mnt/windows_disk/`
323360

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ markdown_extensions:
4646
- pymdownx.emoji:
4747
emoji_index: !!python/name:material.extensions.emoji.twemoji
4848
emoji_generator: !!python/name:material.extensions.emoji.to_svg
49+
- pymdownx.superfences:
50+
custom_fences:
51+
- name: mermaid
52+
class: mermaid
53+
format: !!python/name:pymdownx.superfences.fence_code_format
4954
- pymdownx.inlinehilite
5055
- pymdownx.keys
5156
- pymdownx.superfences

0 commit comments

Comments
 (0)