Is it possible to have Doxygen directly show the only module when clicking the Modules tab?

梦想的初衷 提交于 2019-12-11 03:34:08

问题


Consider the following single-file project.

/** \defgroup api Public API */

/**
 * This is foo and bar together.
 * \ingroup api
 */
void foobar() {
    // Nothing here to see.
}

In the directory containing this file, I run the following commands.

doxygen -g
doxygen Doxyfile

When I open html/index.html, I see three tabs titled Main Page, Modules, and Files respectively.

If I click on Modules, I see a list of all modules, which contains only a single module. I must then click on the module name to see the documentation for the module.

Does there exist an option in Doxygen which allows me to avoid the final click?

That is, if I have only one group in my project, I would like the generated HTML to only require clicking on the Modules tab to show the one group.

I realize that I can manually edit the generated html, but I am looking for in-doxygen ways to do this.


回答1:


You can accomplish this by changing the layout file. First generate a layout file using

doxygen -l

then in your Doxyfile set

LAYOUT_FILE = DoxygenLayout.xml

Now edit the DoxygenLayout file and replace

<tab type="modules" visible="yes" title="" intro=""/>

with

<tab type="user" visible="yes" url="@ref api" title="API" intro=""/>

Can find more info on doxygen layout file here: http://www.doxygen.nl/manual/customize.html#layout



来源:https://stackoverflow.com/questions/41058888/is-it-possible-to-have-doxygen-directly-show-the-only-module-when-clicking-the-m

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