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:
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> */
Include that page in my doxygen included files list
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)
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.
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
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.
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
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.
来源:https://stackoverflow.com/questions/6154848/use-of-doxygens-link-command