Closed DanielHabenicht closed 1 month ago
Thanks for the suggestion! There are already some similar solutions like Markdown Exec, albeit they might (?) not be interactive (tagging @pawamoy for visibility) – maybe it's worth exploring them ☺️ This, currently, goes beyond the scope of Material for MkDocs, as we're focusing on the rendered output, and interactivity is left to third-party integrations, but we may reconsider in the future.
Moving this into discussions for further input by other users.
We do support interactive Python code blocks, thanks to Pyodide. Definitely open to adding support for more languages 🙂
Context
I learned about webcontainers and wanted to integrate them into my existing mkdocs documentation to provide users with interactive examples, which can be changed by them. Unfortunately, there are no extensions for it yet. But I also saw PyScript which does the same for Python.
Description
Make the Documentation more interactive, e.g.:
For now this would probably be limited to node and python examples, but I am sure more web assembly versions of languages will follow.
Related links
Use Cases
As the Documentation Author, I can more easily create hands-on examples of how to work with what I am documenting.
As a user I don't need to install something locally to give it a try, there are fewer barriers.
Visuals
Extra Button for opening the example interactively (but not in the 3rd party service but on your own docs site): Or even better if the output would be side-by-side with the example.
Before submitting