Can Doxygen process pages other than MainPage.dox

匆匆过客 提交于 2019-12-07 05:45:16

问题


If you put a MainPage.dox file in Doxygen's search path, it will add it to the output in Doxygen/html above the source documentation. But can you have multiple files like MainPage.dox? Or are you limited to one?


回答1:


Doxygen will recognize and parse any file that has a *.dox extension and include it in the resulting documentation. What those files will produce is dictated by the doxygen comments located in the file. For example, if you want to modify the main page, you'll need a comment like:

/**
 * @mainpage
 * Documentation you want to occur on the main page.
 */

You can also create documentation that should appear on other pages using this technique:

/**
 * @page another_page Another Page
 * Documentation that will occur on another page.
 */

Assuming HTML output, this form will create a file named another_page.html at the same level as index.html. The title will be Another Page, and the content referenced will follow. An additional tab will also be produced named Related Pages which will have links to all of the related pages created in this manner.

Blocks like this can occur in any file that doxygen parses (including header or source files), and can contain definitions for multiple pages (both of the comments above could be in a single file). The file they're located in does not have an impact on the output that is produced.




回答2:


As of 1.8.4, .md markdown pages can also be included as separate pages without need for .dox C++ like comments /** */ if they are to be considered by doxygen according to your INPUT and FILE_PATTERNS configs.

One difference between using .md and .dox is that .md files produce a Related page with the same name as the basename without extension of the .md file, while .dox only produces pages with names given by \page commands.

It is still possible to use \page commands from .md files.

For example, if file md_page.md contains:

Inside md_page.

\page md_page2 Md Page 2

Inside md_page2

this will generate 2 pages under "Related Pages" entitled:

  • md_page
  • Md Page 2


来源:https://stackoverflow.com/questions/7151360/can-doxygen-process-pages-other-than-mainpage-dox

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