mkdocs / mkdocs-click

An MkDocs extension to generate documentation for Click command line applications
https://pypi.org/project/mkdocs-click
Apache License 2.0
105 stars 15 forks source link

Add option to exclude `hidden` commands, options and groups #51

Closed jan-golda closed 2 years ago

jan-golda commented 2 years ago

Hi! The mkdocs-click works great for me, thanks :bow:

But I have encountered one problem: mkdocs-click does not take into account the Click's hidden flag. I have some groups of commands that are hidden from the --help page and in turn, I would like to also exclude them from the docs.

Click supports hidden both in Command and Option. We could add a flag to mkdocs-click that would filter them out during docs generation.

I could contribute such a feature, but first I would like to discuss that with you.

ofek commented 2 years ago

We would gladly accept such a contribution!

ofek commented 2 years ago

In fact, I would make this the default behavior and add a show_hidden option.

jan-golda commented 2 years ago

I agree, we can treat this change as a fix for unexpected behaviour.

I will try to prepare a PR for that.