0owen
0owen

Reputation: 51

How to get ride of a empty page when using Doxygen to generate markdown user documentation

Currently I am using Doxygen to generate a user document from a few markdown files. I want to generate a custom navigation tree like the following:

And I have 4 markdown pages, here. let's say they are "install.md", "macos.md", "windows.md" and "linux.md".

My install.md file is as follow:

and the "macos.md" , "windows.md" and "linux.md" each has its own page title: such as @page macos , @page windows and @page linux.

The result is very good, but it generate a few empty pages with the file name.

How could I get rid of all these empty page files?

Thanks in advance.

Upvotes: 5

Views: 1310

Answers (2)

Louis Cyphre
Louis Cyphre

Reputation: 1

With doxygen 1.8.10, this seems to work: Use the Header ID Attributes {#pageId} Marker after a Headline in the .md files exclusively.

Doxygen doc for that: http://www.doxygen.nl/manual/markdown.html#md_header_id

Using @page works, but it will create the additional empty page in the navigation tree.

An example... Assuming a little hierarchy:

Main.md
   SubPage1       (Subfolder)
   SubPage1.md    (File in Subfolder)

Main.md:

# Main Page {#mainpage}

This is text...

* \subpage SubPage1

SubPage1.md:

# First Subpage Title {#SubPage1}

Some text for the subpage

The hierarchy will be represented in the generated TreeView, you can nest pages as you like..


The following demonstrates the problem .. it will create the additional empty page ...

SubPage1.md: (Buggy)

@page SubPage1  

# First Subpage Title

Some text for the subpage

Upvotes: -1

Napseis
Napseis

Reputation: 863

I looked for ages for a decent solution, and this is what i found:

In your main markdown file (here install.md), define a group, such as:

\defgroup GrpDummyPages HiddenEmpty
@{
@}

Then in your subpages, for intance your 'windows.md', add at the beginning:

\ingroup GrpDummyPages

In your tree view will appeaer a 'modules' section, with sub-category 'HiddenEmpty', which will contain the pages/files where you put the ingroup command.

Upvotes: 2

Related Questions