Skip to content

Executing Code Blocks #354

Discussion options

You must be logged in to vote

The current code blocks all use Pyodide. They can run any code that is currently loaded into Pyodide, in my case, ColorAide. For general code execution, the code is actually much more simple as I do some advanced stuff to identify color objects so so I can auto-generate color previews and gradients. None of that is needed for basic Python execution and can be stripped out. It can probably be further simplified if you don't need a dedicated "notebook" page.

There are currently two parts

  1. custom code blocks via SuperFences custom fences. This allows me to write normal code blocks in MkDocs with Python code and they will be executed and appear to have been run in a reply showing the results…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@facelessuser
Comment options

Answer selected by facelessuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants