diff --git a/docs/css/extra.css b/docs/css/extra.css index 4031c26..4962e36 100644 --- a/docs/css/extra.css +++ b/docs/css/extra.css @@ -10,6 +10,8 @@ :root { --md-code-font-family: Roboto Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace !important; } +.mermaid { text-align: center; } + .md-typeset #references, .md-typeset .no-underline { margin-bottom: 0; padding-bottom: 0; border: none; } .md-typeset h2 { padding-bottom: 0.2em; border-bottom: 1px solid #d3d3d3; } .md-typeset h3 { padding-bottom: 0.2em; border-bottom: 1px dashed #d3d3d3; } diff --git a/docs/css/extra.scss b/docs/css/extra.scss index 743304d..68c12ac 100644 --- a/docs/css/extra.scss +++ b/docs/css/extra.scss @@ -13,6 +13,10 @@ $color-codes: red, darkred, orangered, green, limegreen; --md-code-font-family: Roboto Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace !important; } +.mermaid { + text-align: center; +} + .md-typeset { #references, .no-underline { diff --git a/docs/ops/service.md b/docs/ops/service.md index 25052c6..afd58df 100644 --- a/docs/ops/service.md +++ b/docs/ops/service.md @@ -23,6 +23,17 @@ Systemd 是一大坨软件,包括服务管理(PID 1)、日志管理(syst 在 systemd 中,运行一个完整系统所需的每个部件都作为“单元”(unit)管理。一个 unit 可以是服务(`.service`)、挂载点(`.mount`)、设备(`.device`)、定时器(`.timer`)以至于目标(`.target`)等,完整的列表可以在 [`systemd.unit(5)`][systemd.unit.5] 中找到。 +```mermaid +graph TD +U(unit) --> A(service) +U --> B(mount) +U --> C(device) +U --> D(target) +U --> E(slice) +U --> F(scope) +``` +{: align=center } + Systemd unit 的配置文件**主要**从以下目录按顺序载入,其中同名的文件只取找到的第一个: - `/etc/systemd/system`:本地配置文件,优先级最高,这也是唯一一个管理员可以手动修改文件的地方。 diff --git a/mkdocs.yml b/mkdocs.yml index 974db40..328da6e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -50,7 +50,11 @@ markdown_extensions: - pymdownx.snippets: auto_append: - includes/man.md - - pymdownx.superfences + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format - toc: permalink: true