refactor: SRE 学习路径抽成独立板块「学习路线」,与知识库同级

- knowledge/sre-learning-path/ -> 学习路线/sre-learning-path/(git mv,404 个文件保留改名历史)
- 导航页新增模块 learning-path(num 03,project 顺延 04),知识库回到 4 份资料
- check-portal.js / add-back-links.js 支持模块目录独立于 id(m.dir || m.id),
  路由仍为 #/learning-path/sre-learning-path,URL 保持 ASCII
- portal.js 快捷键提示按模块数生成、复制板块目录用真实目录名
- docker / linux / nginx 的外链、build-nav.js 生成器与自检白名单改指 ../../学习路线/sre-learning-path/
- 399 个站点页面与全部知识站点的返回入口由 tools/add-back-links.js 重算
  (标签改为「学习路径 › SRE 从零到成熟学习路径」)
- .sre-s23 生成脚手架与根 README、index.html 同步到新路径与新板块数

自检:check-portal / add-back-links --check 全绿;
学习路线站点 399 页与 docker、linux、nginx 的 check-pages 全部通过。
This commit is contained in:
2026-10-14 23:33:29 +08:00
parent 558eb9ae90
commit 3ccd17cad8
459 changed files with 538 additions and 497 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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-learning-path[^"]*"/g, "")),
`${f}: 站内链接不应跑出本资料目录`);
/* 代码块 */