github - 是否可以同时满足 Github 和 Doxygen 的方式编写 Markdown 链接?

标签 github markdown doxygen documentation-generation

我的项目当前的目录结构是 <ProjectRooot>/wiki ,并且在 wiki 中有三个 Markdown 文件目录。

其中一个链接到其他两个,我尝试了两种编写链接的方法。

第一种方式

[Kernel API & Core Negotiation Protocol](wiki/KernelAPI.md)
[Priorities & Starvation](wiki/Priorities.md)

第二种方式
[Kernel API & Core Negotiation Protocol](KernelAPI.md)
[Priorities & Starvation](Priorities.md)

在第一种方式下,链接在 generated Doxygen 中正常工作并且在 github.com 上访问时被破坏.在第二种方式下,链接在 github.com 上正常工作,但 Doxygen 甚至根本不尝试链接。

有没有办法编写同时满足两者的链接?

最佳答案

Is there a way to write the links that will satisfy both?



不,但你可以:
  • 编写它以便在 GitHub 上运行 ( GFM: GitHub Flavored Markdown )
  • 设置本地 content filter driver ( a .gitattributes file 中的涂抹脚本),它将在 git checkout 时将这些链接转换为与 Doxygen 兼容的链接。

  • smudge
    (图片来自“Customizing Git - Git Attributes”,来自“Pro Git book”)

    关于github - 是否可以同时满足 Github 和 Doxygen 的方式编写 Markdown 链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41476971/

    相关文章:

    markdown - Jekyll 是否处理没有前端的文件?

    在 Doxygen 中评论一个文件

    versioning - Doxygen:输出版本号

    javascript:从公共(public) repo 客户端获取所有问题

    github 邀请非 github 用户到私有(private)仓库

    java - Git Hub Actions 使用 Maven 对其他存储库的私有(private)包注册表进行身份验证

    git - "fatal: HttpRequestException encountered."GitHub/Bitbucket 存储库因放弃 TLS-1.0 支持而出错

    github - 默认情况下如何在 README.md 文件中使用 github 风格的 Markdown?

    java - Freemarker:创建一个表,其中包含列表中的列表

    c++ - 如何在 doxygen 中显示 C++ 样式包含语法