Skip to content

Avoid empty Markdown page get generated #9437

@BLumia

Description

@BLumia

Describe the bug
An empty page will be generated if there is a markdown file with empty content.

Expected behavior
Don't generate the empty related pages, or offer an option to avoid generating related pages with empty content.

To Reproduce
notdtkcore.zip (edit: -DDOXYGEN_GENERATE_HTML="YES" needs to be pass to cmake since the default value is "NO" from this example)

Here is a simple test project that can be used to reproduce this issue. Currently it tries to generate Chinese documentation (you can change to English and you will get similar result). I'll explain the thing I want to achieve in Additional context section.

Version

$ doxygen --version
1.9.3
$ lsb_release -a
LSB Version:    n/a
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

Additional context
The main goal is we want to provide both English and Chinese version of documentation for our project, and we want to avoid writing a lot of @~langId in our source file. As a solution, we decided to write documentation outside our source file, so one .dox/.md file only contain documentation for a single language, so we don't need to write a lot of @~langId in our documentation files, only one will be enough.

Then we found, for .dox file it's okay since it's documentation for APIs, but for .md file it isn't. If we generate English documentation by set the OUTPUT_LANGUAGE (via DOXYGEN_OUTPUT_LANGUAGE), then in the demo project, an empty index.zh_CN page will be generated and listed under Related Pages tab.

As a workaround solution, we can use FILE_PATTERNS (via DOXYGEN_FILE_PATTERNS) and filter .zh_CN.md when we generate Chinese documentation or set to .en_US.md when we generate English documentation, so I file this bug and would like to ask, could we have an option to let doxygen avoid generate empty pages, or do we have a better solution for this purpose?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions