Jupyter

Hextra Jupyter Notebook renderer shortcode.

Renders a Jupyter Notebook (.ipynb) as code blocks and Markdown cells.

{{% hextra/jupyter "example-notebook.ipynb" %}}

Parameters:

ParameterDescriptionDefault
positionalPath or URL to the .ipynb file(required)
allowUnsafeHTMLSet to "true" to render raw HTML from notebook outputsfalse

Example:

# A simple Python greeting
message = "Hello from the Academy!"
print(message)
# Generate Fibonacci numbers
def fibonacci(n):
    a, b = 0, 1
    result = []
    for _ in range(n):
        a, b = b, a + b
        result.append(a)
    return result

fibonacci(10)