Summary of Changes
Over the past steps, we updated Wolfblog to support including exported Jupyter notebooks as static HTML files rather than converting them through nbconvert. The main points were:
- Removed
nbconvertworkflow fromMakefileandpelicanconf.py. - Created a dedicated folder
static/undercontent/articles/Technologies/to store exported notebooks and associated_filesfolders. - Updated Markdown files to reference the exported HTML notebook via a relative link.
- Verified
pelicanconf.pyto includestatic/inSTATIC_PATHSso Pelican copies the files without trying to parse them. - Ensured that existing Markdown and reStructuredText posts continue to work normally.
This approach simplifies workflow and avoids the previous warnings about missing date or invalid meta tags when using Pelican.
Exporting a Jupyter Notebook from VS Code
- Open the notebook in VS Code.
- Go to the menu: File → Export As → HTML.
- Save the resulting HTML file (e.g.,
my_notebook.html) and the accompanying_filesfolder into:
wlog/content/articles/Technologies/static/
Example structure:
static/
├── my_notebook.html
└── my_notebook_files/
└── supporting_images.png
Updating the Markdown File
Create a Markdown file in content/articles/Technologies/ with the following structure:
Title: My Notebook Example
Author: Mats Melander
Date: 2025-08-25
Category: Technologies
Tags: [Jupyter, Python]
Summary: Notebook export
[View full notebook](/articles/Technologies/static/my_notebook.html)
The link points to the exported HTML in the
static/folder. Pelican will copy the files and serve them correctly.
Regenerating and Testing the Site
- Clean previously generated files:
make clean
- Regenerate the HTML output:
make html
- Test locally:
make serve
- Open
http://127.0.0.1:8000in a browser. - Navigate to your post and click the "View full notebook" link to verify it works.
Uploading the Site via SSH
Once satisfied, upload the site to your server:
make ssh_upload
- This uses the settings in
pelicanconf.pyforSSH_HOST,SSH_PORT,SSH_USER, andSSH_TARGET_DIR. - The full site, including static notebooks, will be uploaded to the server.
This workflow ensures any new notebook can be added quickly by exporting, placing in static/, updating a Markdown file, and regenerating the site.