rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.42k stars 1.65k forks source link

mdBook x PyOdide: How to make Python code snippets run using pyodide? #2426

Closed jymchng closed 3 months ago

jymchng commented 3 months ago

Question

Hi,

Thank you for your hard work this. It is a lovely piece of work.

Can you point me to how I can possibly tweak to get runnable code snippets using pyodide?

Pyodide is a wasm binary that is compiled from CPython and is capable of running many Python codes within the browser.

Version

No response

ehuss commented 3 months ago

Hi! Unfortunately other languages aren't supported at this time. You may be able to hack something in with a custom theme (such as writing some custom javascript code which adds the relevant buttons and code to the code blocks).

Closing in favor of #350 which is the general issue for supporting other languages.