Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide click:example blocks #719

Open
gsemet opened this issue Jul 24, 2023 · 3 comments
Open

Hide click:example blocks #719

gsemet opened this issue Jul 24, 2023 · 3 comments
Labels
📦 dependencies Update of dependencies 🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors

Comments

@gsemet
Copy link

gsemet commented Jul 24, 2023

i managed to import my complex click app with click:example through a simple import as"

.. click:example::
    from myapp.cli import cli as myapp

.. click:run::
    invoke(myapp, args=["--help"])

how can i hide the 'click:example' in the generated doc, I only need the output ?

@kdeldycke
Copy link
Owner

That's a great feature to have. For the moment Click Extra rely on Pallets-Sphinx-Themes and heavily patch it.

I think at one point we'll have to remove that dependency on Pallets-Sphinx-Themes and embed in-place the code implementing the .. click:example:: and .. click:run:: directive. This will gives us the freedom to add more features and as the nice side effect of removing dependencies.

@kdeldycke kdeldycke changed the title How to hide 'click:example' Hide click:example blocks Jan 16, 2024
@kdeldycke kdeldycke added 📦 dependencies Update of dependencies 🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors labels Jan 16, 2024
@kdeldycke
Copy link
Owner

kdeldycke commented Jan 16, 2024

@kdeldycke
Copy link
Owner

kdeldycke commented Jan 16, 2024

Another advantage of having our own implementation in Click Extra is we would be able to implement support for a MyST-friendly syntax: https://kdeldycke.github.io/click-extra/sphinx.html#usage (i.e. get rid of the {eval-rst} wrapper).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 dependencies Update of dependencies 🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors
Projects
None yet
Development

No branches or pull requests

2 participants