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

Consideration for mkdocs get-deps regarding the [ansi] extra #28

Closed
oprypin opened this issue Nov 26, 2023 · 2 comments
Closed

Consideration for mkdocs get-deps regarding the [ansi] extra #28

oprypin opened this issue Nov 26, 2023 · 2 comments
Assignees

Comments

@oprypin
Copy link

oprypin commented Nov 26, 2023

Hi!
I am thinking how to make this plugin work out of the box with mkdocs get-deps.
Most people would probably want it to suggest markdown-exec[ansi] but it currently gives you just markdown-exec and there's no way to make it include [ansi].

Here are some things that could be done:

  1. Just make pygments-ansi-color a default dependency of this plugin - any big reason why not?

  2. Add a new config that people should use :

     - markdown-exec:
         ansi: required   # one of: [off, required, auto], default: auto

    (bonus compared to the current behavior: it also guards against the ansi feature silently not working - the required setting would break on missing import)

    in which case we can put this option into extra_dependencies in https://github.com/mkdocs/catalog

  3. Somehow just directly put markdown-exec[ansi] into https://github.com/mkdocs/catalog

Separately, I also noticed by reading the implementation that the CSS file is currently also always included into the final site, whether or not the ansi feature was successfully enabled.

@pawamoy
Copy link
Owner

pawamoy commented Nov 28, 2023

No big reason why not including the extra dep by default, other than reducing deps. Option 3 would be a short term solution, but I can implement option 2 instead asap 👍

pawamoy added a commit that referenced this issue Jan 5, 2024
This helps decide whether to include the ANSI CSS file into the final site.

Issue #28: #28
Issue #29: #29
@pawamoy
Copy link
Owner

pawamoy commented Jan 5, 2024

Done. We can now update the catalog. Will send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants