Use of doxygen's \link command
Asked Answered
F

5

11

I have an external HTML file I'd like to have linked form either my doxygen "Related Pages" tab or the left hand frame. It seems I need to use the \link command but I can't find a good example of how to use it or where. I am currently using doxywizard to generate the HTML.

So, is \link something I incorporate into my doxygen config file or do I add it when I build the HTML somehow?

Update

So I ended up having to do the following:

  1. Create a new page (docs_main.html) that had the following:

    /*! \mainpage MY TITLE HERE
     * \section intro_sec External resources
     * <a href="link_to_my_external_page.html">My external page</a>
     */
    
  2. Include that page in my doxygen included files list

  3. Rebuild my documentation

That added to my doxygen "Main Page" the following

MY TITLE HERE

My external page (which was a link to that page)
Folliculin answered 27/5, 2011 at 16:2 Comment(0)
Q
14

Doxygen allows you to insert certain HTML commands in to your documentation, including links. In case you didn't know this is how you make a link in HTML:

<a href="externalfile.html">External file</a>

cdiggins' answer is also worth reading.

Quorum answered 30/5, 2011 at 2:15 Comment(0)
H
19

We have a Markdown support in doxygen nowadays. Your code may be a clearer:

/*! \mainpage MY TITLE HERE
 * \anchor intro_sec
 * # External resources
 * [My external page](http://link_to_my_external_page.html)
 */

The above should render somewhat close to:


External resources

My external page


Ho answered 7/2, 2013 at 14:45 Comment(0)
Q
14

Doxygen allows you to insert certain HTML commands in to your documentation, including links. In case you didn't know this is how you make a link in HTML:

<a href="externalfile.html">External file</a>

cdiggins' answer is also worth reading.

Quorum answered 30/5, 2011 at 2:15 Comment(0)
L
4

The \link (and anything of the form \command or @command) is called a "special command" and is part of the mark-up used in the input files processed by Doxygen not part of the configuration. The \link command does not do what you want.

You could perhaps use the \page command to create a new related page and then use the \htmlinclude command to insert the external HTML file as the contents of that page.

Lillielilliputian answered 30/5, 2011 at 1:53 Comment(0)
S
1

As other answers here looks bits and pieces for a beginner, here is the complete procedure.

1) create an html file with content(ex:abc.html) as below

/*! \mainpage MY TITLE HERE 
 * \section intro_sec External resources
 * <a href="link_to_my_external_page.html">My external page</a>
 */

2) Add this file path in config file here INPUT =

3)Also add your file type here FILE_PATTERNS =

The above procedure opens your file in doxygen window

Add the below content to open the file in explorer

<a href="link_to_my_external_page.html" target="_blank"><b>My external page</b></a>

Note: If file doesn't open try giving absolute path

Spohr answered 7/10, 2016 at 10:58 Comment(0)
R
0

You can add a tab to the main navigation bar (with your link) by using a custom layout file.

Take a look at the Customizing the Output page of the Doxygen manual. It's pretty clear about how to do it, assuming I understood your question.

Ranaerancagua answered 7/3, 2013 at 18:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.