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

Disable All Execution #59

Open
loricah opened this issue Jun 20, 2024 · 2 comments
Open

Disable All Execution #59

loricah opened this issue Jun 20, 2024 · 2 comments
Assignees

Comments

@loricah
Copy link

loricah commented Jun 20, 2024

Describe the solution you'd like

I’d like to see some global argument that I can specify in my mkdocs.yaml or somewhere else that disables all execution, yet still renders the code blocks properly.

Describe alternatives you've considered

With mkdocs versions greater than 1.6, I can add the following to the plugin:

plugins:
    - markdown-exec:
            enabled: !ENV [FILE_EXAMPLES, false]

but this completely breaks the results.

Edit: spelling

@pawamoy
Copy link
Owner

pawamoy commented Jun 24, 2024

That's probably because without specifying the custom fences, exec options aren't recognized anymore by the default fences, and the rendering breaks. I don't see how we can prevent that if the plugin is never loaded because of enabled: false 🤔

@pawamoy
Copy link
Owner

pawamoy commented Jun 24, 2024

Ah, the plugin should probably implement its own enabled option that sets it in a "do nothing" mode instead of completely disabling it.

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