Reputation: 2628
I have created a number of custom pages within Doxygen. I would like to customize the the order of the pages in the main menu. Below is a picture of my current navigation menu. I would like to change the order so Overview is first, Installation second, Introduction third, etc. Is there a way to do this?
Upvotes: 15
Views: 9807
Reputation: 123
A way for grouping HTML/ CHM output is via nested @page and @subpage elements in different files.
So what I've done in the past is to to have a landing page plus several 'strucutre' pages that define the section layout. Each reference needs to be in its own file.
As an exmple:
\mainpage
# Welcome to my main page #
Some text
\subpage IntroductionSection
\subpage DetailsSection
\subpage SamplesSection
And then have a structure for each subage like (IntroStructure.md)
Introduction {#IntroductionSection}
===============
# An introduciton to the topic #
\subpage GettingStarted
\subpage HowTo
\subpage DeepDive
Note that every subpage needs to be referenced with Deep dive {#DeepDive} again.
Thats the way I handle quite a bunch of markdown documents. Works great for html/ chm although you have a certain file overhead.
Upvotes: 4
Reputation: 1520
I know this question is rather old, but its 2017 and I still haven't found a satisfying answer... Since this is the first search hit, I thought I should still leave my workaround here.
I think the easiest and least cumbersome way is to go through the indirection of a single page, containing all your custom pages as subpages. This preserves the input order, e.g. ->
@page page_contents Contents
@tableofcontents
@subpage page_intro Intro
@subpage page_install Install
@subpage page_system System
Upvotes: 2
Reputation: 2177
Doxygen processes the custom pages files names in alphabetical order.
Therefore you can name your custom pages files like :
As a result they will appear in the same order in the generated document. This solutions avoids modifying any configuration file!
Upvotes: 5
Reputation: 1839
After some investigation, it seems Doxygen currently does not support the ordering of pages in a custom (or any) fashion.
Just as @Toby mentions, the current way to ensure a desired order of pages in Doxygen is to ensure the page conditions (\page) are parsed in the same order. For instance, you can achieve the desired order by specifying your files manually such as:
INPUT = Developers.dox \
Hive_Training.dox \
Installation.dox \
Introduction.dox \
Models.dox \
Overview.dox \
Users.dox \
Files.dox
This is not ideal at all, but it works. What I found is that if you wish to maintain using directory paths in your Doxygen configuration file, you can create an 'page order' file to parse first before any other content. For instance:
INPUT += PageOrder.dox
INPUT += ../my_module_1/content/
INPUT += ../my_module_2/content/
And you add all the page references in a PageOrder.dox
file:
\page developers Developers
\page hive_training Hive Training
\page installation Installation
\page introduction Introduction
\page models Models
\page overview Overview
\page users Users
\page files Files
This again, is not ideal; however, your maintenance process now resides in a single page order file (instead of touching one (1) or more Doxygen configuration files).
Upvotes: 6
Reputation: 10144
I found one, rather cumbersome, method of achieving this. Previously I had all my custom doxygen files (images, pages, etc) in one directory named input.
I have each of my pages in a separate file (e.g. main_page.dox, page1.dox, page2.dox, etc)
I moved my custom pages to a separate directory named pages at the same level as the input directory.
(I also renamed my input dir to images, and changed the IMAGE_PATH
accordingly)
Then, in the doxygen config file I added the explicit paths to each page file to the INPUT
variable in the order that I wanted them. E.G:
INPUT= . Documentation\images \
Documentation\pages\main_page.dox \
Documentation\pages\page2.dox \
Documentation\pages\page3.dox
This means that every time I add a new page I have to add its path to the INPUT
, so as I said at the top, it's cumbersome. But better than having conlusions showing up before introductions etc
This works for HTML and LaTeX - haven't tested with other formats
Upvotes: 2