Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I link between markdown documents in 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) 

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.

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.

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?

like image 765
izb Avatar asked Oct 09 '13 15:10

izb


People also ask

How do you link within markdown?

Markdown syntax for a hyperlink is square brackets followed by parentheses. The square brackets hold the text, the parentheses hold the link.

Does doxygen support markdown?

Including Markdown files as pagesDoxygen can process files with Markdown formatting.

Can markdown include other files?

You can now attach files, including images, to markdown files while you're editing them in the web. This works just like file attachments in issues and pull requests and supports the same file types.

How do I create a table in Doxygen?

Doxygen supports two ways to put tables in the documentation. The easiest is to use the Markdown format as shown in Markdown Extensions section Tables. Although this format is easy to use and read, it is also rather limited. It supports only a simple grid of cells, while each cell is a single line of plain text.


1 Answers

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) 
like image 84
adib Avatar answered Sep 23 '22 03:09

adib