Course Section Restructure Implementation Plan

Course Section Restructure Implementation Plan

For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.

Goal: 将所有课程内容统一到 /course 路径下,梳理直观导航,去掉冗余入口,保持原有文本与公式不变、渲染正常。

Architecture: 采用现有 _pages 单页结构;为课程建立清晰的目录与侧边导航层级,统一链接格式,避免重复页面。仅调整文件位置、front matter 与导航数据,不改正文。

Tech Stack: Jekyll (Minimal Mistakes theme), YAML 导航配置,Markdown。

Task 1: 梳理并归档课程页面结构

Files:

  • Modify: _pages/course.md, _data/navigation.yml
  • Inspect: _pages/course-*.md, _pages/database-*.md, _pages/*Query*, _pages/*Storage*, _pages/*Transaction*, _pages/discrete-math.md

Step 1: 列出所有课程页面与 permalink,确认现状 Run: rg "permalink: /course" _pages Expected: 列出所有课程相关文件及路径。

Step 2: 设计统一的章节层级(课程 > 章节)并在导航草案中标记 Action: 记录导航层级草案(不改正文)。

Step 3: 更新课程总览 _pages/course.md 的列表为统一 slug Action: 保留现有描述,确保链接全部指向 /course/<course>/

Step 4: 更新 _data/navigation.ymlcourse_nav 为嵌套:概览 → 各课程 → 章节 Action: 添加章节子项;确保 title 与现有页面标题一致。

Task 2: 整理课程文件命名与位置(不改正文)

Files:

  • Move/Rename: _pages/Query Optimization.md, _pages/Storage & Indexing.md, _pages/Transaction & Concurrency.md
  • Modify front matter of moved files if path changes

Step 1: 将数据库章节文件重命名为无空格、语义清晰的文件名(如 _pages/course-database-query-optimization.md),保持 permalink 不变或更规范 Action: git mv 三个文件;调整 permalink 如需统一为 /course/database/<slug>/

Step 2: 确认所有章节 permalink 统一格式 /course/<course>/<chapter>/ Action: 检查并必要时微调 front matter 中 permalink,不改正文内容。

Task 3: 链接与跳转校验

Files:

  • Modify: any course pages referencing other course URLs

Step 1: 搜索旧链接(含空格文件名或旧 slug)并替换为新格式 Run: rg "/course/database/(storage-indexing|query-optimization|transaction-concurrency)" _pages Action: 更新为统一 slug(如有变更)。

Step 2: 确认 redirect_from 需要保留或新增以兼容旧路径(如曾有带空格路径) Action: 在重命名文件中添加 redirect_from 指向旧 URL(若修改了 permalink)。

Task 4: 验证渲染与结构

Files: n/a

Step 1: 运行本地构建检查(若依赖可用) Run: bundle exec jekyll build Expected: 构建成功无错误;若依赖缺失,记录并改为 jekyll buildbundle exec jekyll build --trace 收集错误信息。

Step 2: 手动检查生成的 _site/course 结构(如构建成功) Run: ls _site/course and find _site/course -maxdepth 2 -type f | sort

Step 3: 总结改动与已验证项 Action: 在交付时说明导航调整、文件重命名、兼容跳转及测试结果。