Skip to content

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

Closed
@oprypin

Description

@oprypin

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions