refactor: 板块 03 改为「SRE 工程师」专属板块,站点迁至 SRE工程师/sre-learning-path/

- 取消「学习路径 / learning-path」模块,新增 id=sre、目录=SRE工程师 的「SRE 工程师」板块:
  统一归档 SRE 相关资料(学习路径 + 排障速查 / SLO 模板 / 值班与复盘模板 / 面试题 / 书单等)
- 学习路线/sre-learning-path/ -> SRE工程师/sre-learning-path/(git mv,404 个文件保留改名历史),
  搬空的 学习路线/ 目录删除
- 路由改为 #/sre/sre-learning-path,返回入口标签改为「SRE 工程师 › SRE 从零到成熟学习路径」
  (399 个页面由 tools/add-back-links.js 重算)
- docker / linux / nginx 的外链、build-nav.js 生成器与自检白名单,.sre-s23 脚手架,
  以及 README / DEPLOY.md(含 nginx 中文目录的百分号编码示例)全部同步到新路径

自检:check-portal(4 个板块 / 6 份资料)、add-back-links --check(454 页)全绿;
SRE 站点 399 页与 docker、linux、nginx 的 check-pages、.sre-s23 四项体检均通过。
This commit is contained in:
2026-10-15 11:55:58 +08:00
parent 495bd3ebaf
commit 84aa0143a8
458 changed files with 501 additions and 500 deletions

View File

@@ -359,7 +359,7 @@ $ sudo runc exec oci-demo cat /etc/alpine-release
<p class="foot">
Docker 专题 · 第 1 章 容器与 Docker 全景:它到底解决了什么问题<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -380,7 +380,7 @@ $ export DOCKER_API_VERSION=1.43
<p class="foot">
Docker 专题 · 第 2 章 安装、配置与命令心智模型<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -374,7 +374,7 @@ $ docker image inspect -f '{{json .Config.Labels}}' registry.example.com/app/api
<p class="foot">
Docker 专题 · 第 3 章 镜像:分层、标识与分发格式<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -654,7 +654,7 @@ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--timeou
<p class="foot">
Docker 专题 · 第 4 章 Dockerfile 全解:从一条指令到可复现的镜像<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -546,7 +546,7 @@ $ docker rm -f api &amp;&amp; docker run -d --name api -m 1g ... registry.exampl
<p class="foot">
Docker 专题 · 第 5 章 容器生命周期与日常操作<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -385,7 +385,7 @@ $ docker volume create bench &amp;&amp; docker run --rm -v bench:/w alpine:3.20
<p class="foot">
Docker 专题 · 第 6 章 存储与数据持久化<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -325,7 +325,7 @@ $ sudo nsenter -t "$PID" -n ip route</pre>
<p class="foot">
Docker 专题 · 第 7 章 网络:容器之间与外界如何通信<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -481,7 +481,7 @@ volumes:
<p class="foot">
Docker 专题 · 第 8 章 Docker Compose:多容器场景的开发标配<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -423,7 +423,7 @@ maintenance:
<p class="foot">
Docker 专题 · 第 9 章 镜像仓库与分发:把镜像安全、可复现地送到每一台机器<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -500,7 +500,7 @@ docker run --rm --pids-limit 100 alpine sh -c ':(){ :|:&amp; };:'
<p class="foot">
Docker 专题 · 第 10 章 安全与镜像治理:把「被攻破」的后果关进容器<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -738,7 +738,7 @@ scan: ## 扫生产镜像的高危漏洞
<p class="foot">
Docker 专题 · 第 11 章 开发工作流实战:把 Docker 用进日常<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -511,7 +511,7 @@ docker inspect -f '{{json .State}}' api # 3. 引擎视角:ExitCode / O
<p class="foot">
Docker 专题 · 第 12 章 生产运维、监控与排障<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -543,7 +543,7 @@ sudo du -sh /var/lib/docker/containers/*/*-json.log 2>/dev/null | sort -h | tail
<p class="foot">
Docker 专题 · 第 13 章 速查表与 20 个高频坑<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -375,7 +375,7 @@ docker compose exec -T db psql -U app -d app_restore -f - &lt; backup/app-2024-0
<p class="foot">
Docker 专题 · 第 14 章 能力自测、面试问答与继续深入<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -97,7 +97,7 @@ section.block > .sub{margin:-6px 0 16px;font-size:15.6px;color:var(--muted)}
<a class="btn" href="#chapters-list">章节目录</a>
<a class="btn" href="#start">5 分钟上手</a>
<a class="btn" href="#pitfalls">最常见的坑</a>
<a class="btn" href="../../学习路线/sre-learning-path/index.html">SRE 学习路径 ↗</a>
<a class="btn" href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径 ↗</a>
</div>
</aside>
<div class="mask" id="mask"></div>
@@ -489,7 +489,7 @@ volumes:
<h4>Docker 专题 ↔ SRE 学习路径</h4>
<ul>
<li>本专题是<b>纵深</b>:把容器这一件事讲到能上手、能排障。</li>
<li><a href="../../学习路线/sre-learning-path/modules/s1-03-container/index.html">SRE · 容器与镜像模块</a> 是<b>横向</b>:
<li><a href="../../SRE工程师/sre-learning-path/modules/s1-03-container/index.html">SRE · 容器与镜像模块</a> 是<b>横向</b>:
放在「服务上线 → 可观测性 → 可靠性」的整条路线里,讲容器在体系中的位置。</li>
<li>想看 CI/CD、监控、K8s 与容器怎么配合,走 SRE 路径的阶段 1–4。</li>
</ul>
@@ -513,7 +513,7 @@ volumes:
<p class="foot">
Docker 专题知识库 · 共 14 章 112 个小节 · 156 段代码<br>
<a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -102,7 +102,7 @@ function pager(c) {
function foot(c) {
return ` Docker 专题 · 第 ${c.num} 章 ${esc(c.title)}<br>\n` +
` <a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>`;
` <a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>`;
}
function kpis() {
@@ -149,7 +149,7 @@ const zones = [
? `<nav class="pager">\n <a class="next" href="${chapters[0].file}"><span class="k">开始阅读 →</span><span class="v">第 1 章 · ${esc(chapters[0].title)}</span></a>\n </nav>`
: `<nav class="pager">\n${pager(c)}\n </nav>`),
Z(/<p class="foot">[\s\S]*?<\/p>/, (c, idx) => idx
? `<p class="foot">\n Docker 专题知识库 · 共 ${chapters.length} 章 ${totalSecs} 个小节 · ${totalPres} 段代码<br>\n <a href="index.html">总目录</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>\n </p>`
? `<p class="foot">\n Docker 专题知识库 · 共 ${chapters.length} 章 ${totalSecs} 个小节 · ${totalPres} 段代码<br>\n <a href="index.html">总目录</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>\n </p>`
: `<p class="foot">\n${foot(c)}\n </p>`)
];

View File

@@ -47,7 +47,7 @@ for (const f of pages) {
must(html.includes('href="assets/doc.css"'), `${f}: doc.css 路径不对`);
must(html.includes('src="assets/doc.js"'), `${f}: doc.js 路径不对`);
must(html.includes('id="themeBtn"'), `${f}: 缺少主题切换按钮`);
must(!/href="\.\.\//.test(markup.replace(/href="\.\.\/\.\.\/学习路线\/sre-learning-path[^"]*"/g, "")),
must(!/href="\.\.\//.test(markup.replace(/href="\.\.\/\.\.\/SRE工程师\/sre-learning-path[^"]*"/g, "")),
`${f}: 站内链接不应跑出本资料目录`);
/* 代码块 */

View File

@@ -361,7 +361,7 @@ BOOT_IMAGE=/vmlinuz-6.8.0-45-generic root=UUID=8d3a... ro quiet splash</pre>
<p class="foot">
Linux 专题 · 第 1 章 Linux 全景:内核、用户态与发行版<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -954,7 +954,7 @@ $ bash -n portable.sh &amp;&amp; dash -n portable.sh &amp;&amp; echo "两种 she
<p class="foot">
Linux 专题 · 第 2 章 Shell 与命令行心智模型<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -769,7 +769,7 @@ $ sudo docker system prune -a --volumes # 会删掉未使用的镜像/卷,
<p class="foot">
Linux 专题 · 第 3 章 文件系统与路径<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -708,7 +708,7 @@ $ lsattr "$p"</pre>
<p class="foot">
Linux 专题 · 第 4 章 用户、权限与提权<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -877,7 +877,7 @@ $ cat /sys/block/nvme0n1/queue/scheduler
<p class="foot">
Linux 专题 · 第 5 章 文本处理与日志分析<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -675,7 +675,7 @@ $ sudo dmesg -T | tail -60</pre>
<p class="foot">
Linux 专题 · 第 6 章 进程、信号与作业管理<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -864,7 +864,7 @@ ExecStart=/opt/myapp/bin/myapp --config /etc/myapp/app.yaml
<p class="foot">
Linux 专题 · 第 7 章 systemd 与服务管理<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -1010,7 +1010,7 @@ $ systemctl status smartd --no-pager | head -5</pre>
<p class="foot">
Linux 专题 · 第 8 章 存储、分区与文件系统管理<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -953,7 +953,7 @@ net.netfilter.nf_conntrack_max = 262144</pre>
<p class="foot">
Linux 专题 · 第 9 章 网络配置与排障<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -824,7 +824,7 @@ maxstartups 10:30:100</pre>
<p class="foot">
Linux 专题 · 第 10 章 SSH 与远程运维<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -868,7 +868,7 @@ nginx@sha256:5b1e6f2c9d0a1f0e2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192</p
<p class="foot">
Linux 专题 · 第 11 章 软件包管理与运行环境<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -873,7 +873,7 @@ $ sudo umount -R /mnt</pre>
<p class="foot">
Linux 专题 · 第 12 章 启动流程、内核与内核参数<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -855,7 +855,7 @@ $ sudo /usr/sbin/biolatency-bpfcc -D 10 # IO 延迟分布:比平均 await
<p class="foot">
Linux 专题 · 第 13 章 性能分析与可观测性<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -1027,7 +1027,7 @@ $ sudo tr '\0' ' ' &lt; /proc/2314/cmdline; echo</pre>
<p class="foot">
Linux 专题 · 第 14 章 安全加固与应急响应<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -1022,7 +1022,7 @@ repos:
<p class="foot">
Linux 专题 · 第 15 章 开发环境实战:把 Linux 用进日常<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -1007,7 +1007,7 @@ $ sudo systemctl reboot</pre>
<p class="foot">
Linux 专题 · 第 16 章 速查表与 30 个高频坑<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -875,7 +875,7 @@ SEE ALSO
<p class="foot">
Linux 专题 · 第 17 章 能力自测与面试<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -99,7 +99,7 @@ section.block > .sub{margin:-6px 0 16px;font-size:15.6px;color:var(--muted)}
<a class="btn" href="#start">5 分钟上手</a>
<a class="btn" href="#pitfalls">最常见的坑</a>
<a class="btn" href="../docker/index.html">Docker 专题 ↗</a>
<a class="btn" href="../../学习路线/sre-learning-path/index.html">SRE 学习路径 ↗</a>
<a class="btn" href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径 ↗</a>
</div>
</aside>
<div class="mask" id="mask"></div>
@@ -567,7 +567,7 @@ $ dmesg -T -l err,warn | tail -5 # 内核层有没有 OOM / IO
<p class="foot">
Linux 专题知识库 · 共 17 章 126 个小节 · 327 段代码<br>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>
<a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>
</p>
</main>
</div>

View File

@@ -104,7 +104,7 @@ function pager(c) {
function foot(c) {
return ` ${SITE} · 第 ${c.num} 章 ${esc(c.title)}<br>\n` +
` <a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · ` +
`<a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>`;
`<a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>`;
}
function kpis() {
@@ -151,7 +151,7 @@ const zones = [
? `<nav class="pager">\n <a class="next" href="${chapters[0].file}"><span class="k">开始阅读 →</span><span class="v">第 1 章 · ${esc(chapters[0].title)}</span></a>\n </nav>`
: `<nav class="pager">\n${pager(c)}\n </nav>`),
Z(/<p class="foot">[\s\S]*?<\/p>/, (c, idx) => idx
? `<p class="foot">\n ${SITE}知识库 · 共 ${chapters.length} 章 ${totalSecs} 个小节 · ${totalPres} 段代码<br>\n <a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>\n </p>`
? `<p class="foot">\n ${SITE}知识库 · 共 ${chapters.length} 章 ${totalSecs} 个小节 · ${totalPres} 段代码<br>\n <a href="index.html">总目录</a> · <a href="../docker/index.html">Docker 专题</a> · <a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>\n </p>`
: `<p class="foot">\n${foot(c)}\n </p>`)
];

View File

@@ -79,8 +79,8 @@ for (const f of files) {
const keys = (html.match(/<meta name="keywords" content="([^"]*)"/) || [, ""])[1];
if (keys.trim().length < 6) own.push(`meta keywords 太短或缺失(${keys.length} 字)`);
if (/href="\.\.\/(?!docker\/|\.\.\/学习路线\/sre-learning-path\/)/.test(markup)) {
own.push("站内链接不应跑出本资料目录(只允许 ../docker/ 与 ../../学习路线/sre-learning-path/)");
if (/href="\.\.\/(?!docker\/|\.\.\/SRE工程师\/sre-learning-path\/)/.test(markup)) {
own.push("站内链接不应跑出本资料目录(只允许 ../docker/ 与 ../../SRE工程师/sre-learning-path/)");
}
/* ---------------- 代码块 ---------------- */

View File

@@ -54,8 +54,8 @@ for (const f of pages) {
must(html.includes('href="assets/doc.css"'), `${f}: doc.css 路径不对`);
must(html.includes('src="assets/doc.js"'), `${f}: doc.js 路径不对`);
must(html.includes('id="themeBtn"'), `${f}: 缺少主题切换按钮`);
must(!/href="\.\.\/(?!docker\/|\.\.\/学习路线\/sre-learning-path\/)/.test(markup),
`${f}: 站内链接不应跑出本资料目录(只允许 ../docker/ 与 ../../学习路线/sre-learning-path/)`);
must(!/href="\.\.\/(?!docker\/|\.\.\/SRE工程师\/sre-learning-path\/)/.test(markup),
`${f}: 站内链接不应跑出本资料目录(只允许 ../docker/ 与 ../../SRE工程师/sre-learning-path/)`);
/* 代码块 */
const pres = markup.match(/<pre[\s\S]*?<\/pre>/g) || [];

View File

@@ -446,7 +446,7 @@ $ docker exec t nginx -s reload &amp;&amp; curl -s localhost:8080/a # exact
<ul>
<li><a href="../linux/index.html">Linux 专题</a>:排障要用到的系统层工具与内核参数</li>
<li><a href="../docker/index.html">Docker 专题</a>:nginx 常常就是那个被跑的容器</li>
<li><a href="../../学习路线/sre-learning-path/index.html">SRE 学习路径</a>:把 nginx 放回「上线 → 可观测 → 可靠性」的体系里</li>
<li><a href="../../SRE工程师/sre-learning-path/index.html">SRE 学习路径</a>:把 nginx 放回「上线 → 可观测 → 可靠性」的体系里</li>
</ul>
</div>
</div>

View File

@@ -143,5 +143,5 @@ node tools/verify-behavior.js nginx:1.29-alpine # 换个版本,看行为
nginx 常常就是那个被起的容器(容器里跑 nginx 的注意点见第 2 章 2.7)。
- [Linux 专题](../linux/index.html):是地基。文件描述符、内核参数、
`ss` / `tcpdump` / `strace` 这些排障手段在第 14 章会直接用到。
- [SRE 学习路径](../../学习路线/sre-learning-path/index.html):把 nginx 放回
- [SRE 学习路径](../../SRE工程师/sre-learning-path/index.html):把 nginx 放回
「上线 → 可观测 → 可靠性」的整条路线里看。

View File

@@ -78,8 +78,8 @@ for (const f of files) {
const keys = (html.match(/<meta name="keywords" content="([^"]*)"/) || [, ""])[1];
if (keys.trim().length < 6) own.push(`meta keywords 太短或缺失(${keys.length} 字)`);
if (/href="\.\.\/(?!(docker|linux|nginx)\/|\.\.\/学习路线\/sre-learning-path\/)/.test(markup)) {
own.push("站内链接不应跑出本资料目录(只允许 ../docker/、../linux/、../nginx/、../../学习路线/sre-learning-path/)");
if (/href="\.\.\/(?!(docker|linux|nginx)\/|\.\.\/SRE工程师\/sre-learning-path\/)/.test(markup)) {
own.push("站内链接不应跑出本资料目录(只允许 ../docker/、../linux/、../nginx/、../../SRE工程师/sre-learning-path/)");
}
/* ---------------- 代码块 ---------------- */

View File

@@ -48,7 +48,7 @@ for (const f of pages) {
must(html.includes('href="assets/doc.css"'), `${f}: doc.css 路径不对`);
must(html.includes('src="assets/doc.js"'), `${f}: doc.js 路径不对`);
must(html.includes('id="themeBtn"'), `${f}: 缺少主题切换按钮`);
must(!/href="\.\.\//.test(markup.replace(/href="\.\.\/(docker|linux|nginx)\/[^"]*"|href="\.\.\/\.\.\/学习路线\/sre-learning-path\/[^"]*"/g, "")),
must(!/href="\.\.\//.test(markup.replace(/href="\.\.\/(docker|linux|nginx)\/[^"]*"|href="\.\.\/\.\.\/SRE工程师\/sre-learning-path\/[^"]*"/g, "")),
`${f}: 站内链接不应跑出本资料目录(只允许指向其它知识站点的页面)`);
/* 代码块 */