matusnovak/doxybook2

Disable files list of .c/.cpp files?

markand opened this issue · 3 comments

Hello,

First of, I really love doxybook2 combined with mkdocs, I built my documentation in a very convenient way. Great work!

I'm facing a small issue that I'd like to remove, I created a dummy C file that contains just some doxygen commands (to create groups and modules mostly) and listed in as doxygen input.

With the official doxygen HTML output, the files list only contain .h files:

Screenshot 2020-11-30 at 13 43 39

On the other hand, with doxybook2+mkdocs (using the same Doxyfile), the .c files is listed there.

Screenshot 2020-11-30 at 13 44 36

See here, the groups.c file is listed while it shouldn't.

This is my mkdocs.yml configuration:

site_name: Molko's Adventure
theme: material
markdown_extensions:
  - admonition
  - tables
  - def_list
nav:
  - Home: index.md
  - About: about.md
  - Installation: install.md
  - Specifications:
    - map: specs/map.md
    - tileset: specs/tileset.md
  - Tools:
    - mlk-bcc: tools/bcc.md
    - mlk-map: tools/map.md
    - mlk-tileset: tools/tileset.md
  - Developer corner:
    - Notes:
      - Error handling: dev/error.md
      - Ownership: dev/ownership.md
      - FAQ: dev/faq.md
    - Howto:
      - dev/howto/01-init.md
    - CMake macros:
      - cmake/MolkoBuildAssets.md
      - cmake/MolkoBuildMaps.md
      - cmake/MolkoBuildTilesets.md
      - cmake/MolkoBuildTranslations.md
      - cmake/MolkoDefineExecutable.md
      - cmake/MolkoDefineLibrary.md
      - cmake/MolkoDefineTest.md
      - cmake/MolkoSetBuildDirectories.md
      - cmake/MolkoSetCompilerFlags.md
    - API Reference:
      - Modules: modules/index.md
      - Files: files/index.md

And this is the doxybook configuration:

{
  "baseUrl": "/",
  "indexInFolders": true,
  "linkSuffix": "/",
  "indexClassesName": "index",
  "indexFilesName": "index",
  "indexGroupsName": "index",
  "indexNamespacesName": "index",
  "indexRelatedPagesName": "index",
  "indexExamplesName": "index",
  "mainPageInRoot": true,
  "mainPageName": "index",
  "folderClassesName": "classes",
  "folderExamplesName": "examples",
  "folderFilesName": "files",
  "folderGroupsName": "modules",
  "folderNamespacesName": "namespaces",
  "folderRelatedPagesName": "pages"
}

Is there an option for this? I wasn't unable to find it or is it a doxygen issue?

Hello @markand

I have added a filesFilter option into the config. It's an array of allowed file extensions, which allows you to specify which files are allowed to be included in the output. It is empty by default in which case it allows all files.

This doesn't affect the source input. The contents of the file (even if excluded by this filter) will be processed and included in the output. This filter will only remove the file itself from being listed in the output. Hopefully that solves your problem.

I have added more information in the "Config Values" section in the Readme.

In your example, that would be:

{
    "baseUrl": "/",
    [...]
    "filesFilter": [".h"]
}

Note: It's a list of file extensions, not a file pattern, don't use *.h.

However, I am unable to make a release today, because GitHub actions are stuck. GitHub seems to have an incident. I will make a release with this change tomorrow.

Thanks for this quick support!

If you're planning to create a release just for this issue, maybe wait a bit because I've been facing one with the lacks of union documentation (any link to a union in my doc ends in a dead link) so I was planning to create a minimal reproduction and seeing if I can patch it myself to send a PR.

The new config option has been added and released in releases/tag/v1.3.0