当前 docs 存在使用相对路径来引用本仓库中非 docs 目录的路径,例如 ../../../relax/entrypoints/train.py ,在最终构建的文档 https://redai-studio.github.io/Relax/zh/guide/architecture.html#_1-%E5%85%A5%E5%8F%A3%E5%B1%82 当中使用相对路径之后的 url 是 https://redai-studio.github.io/relax/entrypoints/train.py.html 导致死链。
感觉有两种处理方式,先记录如下:
- 直接使用 github url 的形式引用路径
- 保持相对路径的写法,但是在 docs 构建的过程中,加一个处理步骤进行内容替换,可以手动配置一个 branch_name: main 然后替换成
https://github.com/redai-studio/Relax/blob/<branch_name>/relax/entrypoints/train.py
当前 docs 存在使用相对路径来引用本仓库中非 docs 目录的路径,例如
../../../relax/entrypoints/train.py,在最终构建的文档 https://redai-studio.github.io/Relax/zh/guide/architecture.html#_1-%E5%85%A5%E5%8F%A3%E5%B1%82 当中使用相对路径之后的 url 是https://redai-studio.github.io/relax/entrypoints/train.py.html导致死链。感觉有两种处理方式,先记录如下:
https://github.com/redai-studio/Relax/blob/<branch_name>/relax/entrypoints/train.py