Writing & Markdown

Notebooks

Render Jupyter Notebooks (.ipynb) directly on your Hugo site — show or hide code cells, outputs, and metadata.

Render Jupyter Notebooks (.ipynb) directly in your content. Preserves code cells, Markdown, and rich outputs (plots, HTML, JSON).

Local File (in assets/notebooks/ or page bundle):

{{</* notebook src="analysis.ipynb" */>}}

Remote URL:

{{</* notebook src="https://raw.githubusercontent.com/user/repo/main/demo.ipynb" */>}}
OptionDefaultDescription
srcRequired. Path to .ipynb file or remote URL
titlefilenameCustom header title
show_codetrueShow/hide input (code) cells
show_outputstrueShow/hide output cells
show_metadatafalseShow kernel and notebook info
line_numbersfalseShow line numbers in code cells

Examples

Show Only Outputs

Great for embedding results without the code:

{{</* notebook src="results.ipynb" show_code="false" */>}}

Show Only Code

For teaching — show the code but hide the outputs:

{{</* notebook src="tutorial.ipynb" show_outputs="false" line_numbers="true" */>}}

With Custom Title

{{</* notebook src="analysis.ipynb" title="Data Analysis Results" */>}}

Full Details

Show everything including kernel metadata:

{{</* notebook src="experiment.ipynb" show_metadata="true" line_numbers="true" */>}}

For the best experience, keep your notebooks in the same folder as your Markdown file (page bundle). This makes src="notebook.ipynb" work instantly without path headaches.

Was this page helpful?

From the makers of

© 2026 Lore Labs.

On this page