How do I link between markdown documents in doxygen?

后端 未结 4 1101
走了就别回头了
走了就别回头了 2020-12-15 03:42

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

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

The pages al

4条回答
  •  Happy的楠姐
    2020-12-15 04:36

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

    • 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.

    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)
    

    Apparently this also is the way prescribed by the Doxygen's primary author.

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

    In MyOtherPage.md have this as the header

    # My Other Page Title {#MyOtherPageName}
    

    then link it like so

    [Go to this page](@ref MyOtherPageName)
    

提交回复
热议问题