Jupyter
Hextra Jupyter Notebook renderer shortcode.
1 minute read
Renders a Jupyter Notebook (.ipynb) as code blocks and Markdown cells.
{{% hextra/jupyter "example-notebook.ipynb" %}}
Parameters:
| Parameter | Description | Default |
|---|---|---|
| positional | Path or URL to the .ipynb file | (required) |
allowUnsafeHTML | Set to "true" to render raw HTML from notebook outputs | false |
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)