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.开发者_如何学JAVAdox? Or are you limited to one?
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.
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
精彩评论