Skip to content

【Docs】记录 docs 中相对路径引用本仓库其他路径的问题 #313

Description

@ooooo-create

当前 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 导致死链。

感觉有两种处理方式,先记录如下:

  1. 直接使用 github url 的形式引用路径
  2. 保持相对路径的写法,但是在 docs 构建的过程中,加一个处理步骤进行内容替换,可以手动配置一个 branch_name: main 然后替换成 https://github.com/redai-studio/Relax/blob/<branch_name>/relax/entrypoints/train.py

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions