{"repo":"pawamoy/markdown-exec","free":true,"listed":false,"github":"https://github.com/pawamoy/markdown-exec","clone":"git clone https://github.com/pawamoy/markdown-exec.git","description":"Utilities to execute code blocks in Markdown files.","language":"Python","stars":172,"topics":["markdown","python-markdown","literate-programming"],"license":"ISC","category":"productivity","readme_excerpt":"Markdown Exec Utilities to execute code blocks in Markdown files. For example, you write a Python code block that computes some HTML, and this HTML is injected in place of the code block. Installation The ansi extra provides the necessary bits ( pygments-ansi-color and a CSS file) to render ANSI colors in HTML code blocks. The CSS file is automatically added to MkDocs' extra css when Markdown Exec is activated via plugins (see below). Configuration This extension relies on the SuperFences extension of PyMdown Extensions. To allow execution of code blocks, configure a custom fence from Python: ...or in MkDocs configuration file, as a Markdown extension: ...or in MkDocs configuration file, as a plugin: ...or in Zensical configuration file, as a legacy plugin: TIP: We recommend enabling Markdown Exec with the MkDocs plugin if you are using MkDocs/Zensical: it will take care of adding relevant assets (CSS/JS) to the final site when needed. WARNING: Limitation of configuration through Markdown/PyMDown for MkDocs. Configuration through pymdownx.superfences directly is not well supported within MkDocs for fences that require assets inclusion, like pyodide . For these you will have to include the assets manually. In the future we will provide ways to include them automatically. In Zensical these assets are provided natively. Usage You are now able to execute code blocks instead of displaying them: python exec=\"on\" print(\"Hello Markdown!\") The exec option will be true for every possib","default_branch":null,"files":null,"tree":[],"storefront":"/r/pawamoy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pawamoy/markdown-exec/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}