Use of doxygen's \\link command

有些话、适合烂在心里 提交于 2019-12-01 03:35:45
David Grayson

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

My external page


cdiggins

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

andrezsanchez

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!