Skip to content

docs: register RVV acceleration page in sidebar and add English version - #218

Open
yangwenjie1231 wants to merge 1 commit into
sipeed:mainfrom
yangwenjie1231:docs/rvv-navigation-and-en
Open

yangwenjie1231 wants to merge 1 commit into
sipeed:mainfrom
yangwenjie1231:docs/rvv-navigation-and-en

Conversation

@yangwenjie1231

Copy link
Copy Markdown
Contributor

问题

PR #176 新增了 docs/doc/zh/pro/rvv.md,但没有在 sidebar.yaml 里登记。

teedoc 会为每个 .md 生成页面,而导航树由 sidebar.yaml 单独决定 —— 两件事互相独立。结果是页面确实被构建了、直链能打开,却在导航里没有任何入口,成了孤立页面:

  • https://wiki.sipeed.com/maixpy/doc/zh/pro/rvv.html → 200,标题「使用RVV加速」,正文完整
  • 侧边栏「进阶」分组里没有这个条目,目录、上一页/下一页也都到不了它

另外,中文页右上角的语言切换按钮会无条件指向 /maixpy/doc/en/pro/rvv.html,而英文文件并不存在 → 切英文 404。

改动

导航

  • docs/doc/zh/sidebar.yaml、docs/doc/en/sidebar.yaml:把 pro/rvv.md 登记进「进阶」/「Advanced」分组

英文版

  • docs/doc/en/pro/rvv.md:新增

中文页内容整理(920 → 485 行)

  • 原文第 387 行之后基本是同一份内容的错乱副本:「替代方案:不使用 menuconfig 进行配置」「Python API」「测试」「复制粘贴命令」「故障排除」各重复 2~4 次,已合并
  • 正文原有 5 个一级标题,与 front-matter 的 title 冲突导致大纲层级错乱,已降级;现在整页只有 1 个 H1
  • 第 41 行 维护者:yangwenjie1231(https://github.com/yangwenjie1231) 中的全角 ) 被自动链接吞进 URL,实际生成 https://github.com/yangwenjie1231%EF%BC%89(404),已修正
  • 去掉 GitHub Release 说明体例(LGPL 许可全文、release notes),许可信息压缩到文末一节

图片

  • docs/doc/assets/rvv_performance_comparison.jpg:性能对比图原本是 maixhub 外链,仓库里其余图片引用都走 ../../assets/,已转存进仓库并改用相对路径(顺带裁掉了原文件 JPEG 结束标记后的 26 字节 CDN 附加数据)

技术内容(错误信息原文、编译参数、路径、示例代码)全部保留,未做删减。

验证

本地用 teedoc 完整构建(build ok,exit 0),核对产物 HTML:

检查项 中文 英文
H1 数量 1 1
侧边栏收录 是(在「编译系统」后) 是(在 Build OS 后)
语言切换目标存在 是 是
图片产物可解析 是(40576 字节) 是(40576 字节)
坏链接 / 空代码块 无 / 0 无 / 0
搜索索引收录 是,内容为新版 是,内容为新版

侧边栏产物片段(取自相邻页面 compile_os.html,避免只看目标页造成误判):

<li class="not_active with_link"><a href="/maixpy/doc/zh/pro/rvv.html"><span class="label">使用RVV加速</span></a></li>

关联:原 PR #176

PR sipeed#176 added `docs/doc/zh/pro/rvv.md` but never registered it in
`sidebar.yaml`. teedoc builds a page for every `.md` file, so the page
was generated and reachable by direct URL, but it had no entry in the
navigation and became an orphan page. The language switcher also
pointed at an English page that did not exist, returning 404.

- register `pro/rvv.md` in both `docs/doc/zh/sidebar.yaml` and
  `docs/doc/en/sidebar.yaml`
- add the missing English version `docs/doc/en/pro/rvv.md`
- tidy up the Chinese page: merge the duplicated sections, drop the
  stray top-level headings so the page has a single H1, fix a link
  broken by a full-width parenthesis, and rewrite the release-notes
  framing into normal document form
- move the performance chart into `docs/doc/assets/` instead of
  hotlinking maixhub, matching how the rest of the docs reference
  images

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant