如何在Doxygen的降价文档之间链接? [英] How do I link between markdown documents in doxygen?

查看:225
本文介绍了如何在Doxygen的降价文档之间链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中包含一组降价页面,这些页面与链接(例如,

I have a project with a set of markdown pages that are interlinked with links such as

[Go to this page](subdir/MyOtherPage.md)

所有页面都被doxygen拾取并显示在输出中,但是链接并未更改以指向其新的html格式.

The pages all get picked up by doxygen and appear in the output, but the links are not altered to point to their new html renditions.

我可以更改指向html页面的链接,但是我的项目托管在github上,然后这些链接将被破坏,因为github支持自动在markdown页面之间进行链接.

I could change the links to point to the html pages, but my project is hosted on github and then those links would become broken since github supports linking between markdown pages automatically.

在doxygen文档中,我看不到任何有关支持外部链接以外的链接的信息.有什么方法可以使doxygen从markdown生成HTML链接?

I can't see anything in the doxygen documentation about supporting links other than external ones. Is there any way to make doxygen produce an HTML link from a markdown one?

推荐答案

根据Doxygen 1.8.7,有三种方法可以做到这一点:

As per Doxygen 1.8.7 there are three ways to do this:

  • 使用原始问题中所述的标准markdown超链接.
  • 使用@ref,并在目标之前加上md_以及所有子目录.
  • 为页面命名,并使用@ref引用名称.
  • Use a standard markdown hyperlink as described in your original question.
  • Use a @ref and prefix the target with md_ along with any subdirectories.
  • Name the page and use @ref to refer to the name.

第一种方法很简单,并且在没有Doxygen的情况下也可以使用(例如,在Github上浏览代码存储库时).

The first method is straightforward and this will also work without Doxygen (e.g. when browsing your code repository on Github).

[Go to this page](subdir/MyOtherPage.md)

第二种方法则需要像这样链接它:

Whereas the second method you'll need to link it like this:

[Go to this page](@ref md_subdir_MyOtherPage)

显然,这也是规定的方式由Doxygen的主要作者.

最后,在第三种方法中,您需要为目标页面指定一个名称,然后链接到该名称.示例:

Lastly in the third method you'll need to have a name for the target page and then link to that name. Example:

MyOtherPage.md中将此作为标题

# My Other Page Title {#MyOtherPageName}

然后将其链接为

[Go to this page](@ref MyOtherPageName)

这篇关于如何在Doxygen的降价文档之间链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆