Rename Tutorials to Documents Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Change the "教程" link on the landing page/navigation bar from https://liiistem.cn/docs/ to https://liiistem.cn/docs, and rename the navigation title from "教程" to "文档".
Architecture: Update the hardcoded link (/docs/) and text ("教程") in the theme's custom navbar.vue component to /docs and "文档" respectively. Ensure all other internal redirect and markdown files linking directly to /docs/ are updated to /docs for consistency. Switch branch to a new feature branch and create a PR via Gitee CLI.
Tech Stack: Vue 3, VitePress, Gitee CLI, Git
Task 1: Initialize Git Feature Branch
Files:
Create/Switch Branch:
jl/rename-docs-link[ ] Step 1: Create and switch to new branch
Run: git checkout -b jl/rename-docs-link Expected: Switched to a new branch 'jl/rename-docs-link'
Task 2: Update Navbar Navigation Component
Files:
Modify:
docs/.vitepress/theme/components/navbar.vue[ ] Step 1: Replace user-facing desktop and mobile navbar links and labels
In docs/.vitepress/theme/components/navbar.vue:
- Replace
<a href="/docs/" class="nav-link">教程</a>with<a href="/docs" class="nav-link">文档</a>on line 16. - Replace
<a href="/docs/" class="mobile-nav-link primary" @click="toggleMobileMenu">教程</a>with<a href="/docs" class="mobile-nav-link primary" @click="toggleMobileMenu">文档</a>on line 217.
Task 3: Update 404 Markdown Link
Files:
Modify:
docs/404.md[ ] Step 1: Replace documentation center link in 404 navigation
In docs/404.md:
- Replace
- [📚 浏览文档中心](/docs/)with- [📚 浏览文档中心](/docs)on line 38.
Task 4: Update Documentation Redirection Component
Files:
Modify:
docs/docs/welcome.md[ ] Step 1: Replace redirection URLs to point to
/docs
In docs/docs/welcome.md:
- Replace
content: '0; url=/docs/'withcontent: '0; url=/docs'on line 7. - Replace
点击 [此处](/docs/)。with点击 [此处](/docs)。on line 12. - Replace
router.go('/docs/')withrouter.go('/docs')on line 20.
Task 5: Build and Lint Verification
Files:
Build outputs in
website/[ ] Step 1: Run VitePress build to verify build integrity
Run: yarn docs:build Expected: Build finishes with exit code 0 and files are written to website/ without dead link warnings.
- [ ] Step 2: Run linter and formatter
Run: yarn lint && yarn format Expected: Linter runs successfully, fixing formatting or style consistency issues if any.
Task 6: Push and Create Gitee Pull Request
Files:
Git remote:
originPR created via Gitee CLI
[ ] Step 1: Git stage and commit changes
Run:
git add docs/.vitepress/theme/components/navbar.vue docs/404.md docs/docs/welcome.md
git commit -m "docs: rename 教程 to 文档 and update docs link to /docs"- [ ] Step 2: Push changes to Gitee
Run: git push -u origin jl/rename-docs-link
- [ ] Step 3: Create Gitee PR using the Gitee CLI
Run:
/opt/homebrew/bin/gitee pr create \
--base main \
--head jl/rename-docs-link \
--title "[中文官网] 侧边栏导航调整" \
--body "$(cat <<'EOF'
## 改动概要
将导航栏的「教程」改名为「文档」,并将链接由 `/docs/` 修改为不带斜杠的 `/docs`。
## 详细变更
- `docs/.vitepress/theme/components/navbar.vue`:修改桌面端和移动端导航栏中的「教程」为「文档」,链接从 `/docs/` 修改为 `/docs`
- `docs/404.md`:更新 404 页面中的文档中心链接,去除末尾斜杠
- `docs/docs/welcome.md`:更新页面重定向和跳转链接,去除末尾斜杠
EOF
)"Expected: Gitee PR created successfully and URL outputted.