| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Docs][RTD]Fix ReadTheDocs build to use zh/en source directories Co-authored-by: changetheway<guotaoyuan1@h-partners.com> # message auto-generated for no-merge-commit merge: !293 merge rtd_0513 into dev [Docs][RTD]Fix ReadTheDocs build to use zh/en source directories Created-by: changetheway Commit-by: changetheway Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes 无关issue,仅修正文档服务 # Purpose - 修复 ReadTheDocs 因python版本和Sphinx版本不匹配导致无法构建的问题。 修改内容: 1. .readthedocs.yaml:改用 python3.11 - 修复 ReadTheDocs 构建的文档首页显示英文目录而非中文目录的问题。 根因:ReadTheDocs 默认使用 docs/ 作为 Sphinx 源目录,首页渲染的是 docs/index.md,其 toctree caption 为英文("Getting Started"、"User Guide" 等)。而中文首页 docs/zh/index.md 的 toctree caption 为中文("快速开始"、"加速特性" 等),但 ReadTheDocs 未以其为构建源目录。 修改内容: 1. .readthedocs.yaml:改用 build.commands 自定义构建,分别用 docs/zh/ 和 docs/en/ 作为源目录构建中文和英文文档,根入口重定向到中文首页 2. docs/conf.py:根据 READTHEDOCS 环境变量动态设置语言切换器 URL,适配 ReadTheDocs 与本地构建的不同输出路径 3. docs/_templates/language-switcher.html 及其组件:改进 JS 路径解析,同时支持本地构建的 /html/ 路径和 ReadTheDocs 的 /zh/、/en/ 路径 # Test Plan 1. 合并后触发 ReadTheDocs 构建,观察构建日志是否成功 2. 访问 https://mindie-sd-docs.readthedocs.io/zh-cn/latest/ 确认自动跳转到中文首页 3. 检查中文首页左侧目录是否为中文标题("快速开始"、"加速特性" 等) 4. 检查英文首页左侧目录是否为英文标题("Getting Started"、"Feature Guides" 等) 5. 验证语言切换器在中英文页面间正确跳转 # Test Report https://mindie-sd-docs.readthedocs.io/zh-cn/latest/zh/index.html See merge request: Ascend/MindIE-SD!293 | 1 个月前 | |
[Docs][RTD]Fix ReadTheDocs build to use zh/en source directories Co-authored-by: changetheway<guotaoyuan1@h-partners.com> # message auto-generated for no-merge-commit merge: !293 merge rtd_0513 into dev [Docs][RTD]Fix ReadTheDocs build to use zh/en source directories Created-by: changetheway Commit-by: changetheway Merged-by: ascend-robot Description: # Which issue(s) this PR fixes or accomplishes 无关issue,仅修正文档服务 # Purpose - 修复 ReadTheDocs 因python版本和Sphinx版本不匹配导致无法构建的问题。 修改内容: 1. .readthedocs.yaml:改用 python3.11 - 修复 ReadTheDocs 构建的文档首页显示英文目录而非中文目录的问题。 根因:ReadTheDocs 默认使用 docs/ 作为 Sphinx 源目录,首页渲染的是 docs/index.md,其 toctree caption 为英文("Getting Started"、"User Guide" 等)。而中文首页 docs/zh/index.md 的 toctree caption 为中文("快速开始"、"加速特性" 等),但 ReadTheDocs 未以其为构建源目录。 修改内容: 1. .readthedocs.yaml:改用 build.commands 自定义构建,分别用 docs/zh/ 和 docs/en/ 作为源目录构建中文和英文文档,根入口重定向到中文首页 2. docs/conf.py:根据 READTHEDOCS 环境变量动态设置语言切换器 URL,适配 ReadTheDocs 与本地构建的不同输出路径 3. docs/_templates/language-switcher.html 及其组件:改进 JS 路径解析,同时支持本地构建的 /html/ 路径和 ReadTheDocs 的 /zh/、/en/ 路径 # Test Plan 1. 合并后触发 ReadTheDocs 构建,观察构建日志是否成功 2. 访问 https://mindie-sd-docs.readthedocs.io/zh-cn/latest/ 确认自动跳转到中文首页 3. 检查中文首页左侧目录是否为中文标题("快速开始"、"加速特性" 等) 4. 检查英文首页左侧目录是否为英文标题("Getting Started"、"Feature Guides" 等) 5. 验证语言切换器在中英文页面间正确跳转 # Test Report https://mindie-sd-docs.readthedocs.io/zh-cn/latest/zh/index.html See merge request: Ascend/MindIE-SD!293 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 |