Publishing blog posts to WordPress#
Example usage#
Convert notebook to HTML using
jupyter-nbconvert --to HTML --template basic --embed-images blogposts/<postname>.ipynb
This command will produce the HTML file
blogposts/<postname>.html
Copy-paste the HTML from
blogposts/<postname>.html
into a new post (source).Remove the first few lines (H1 heading) to avoid double title
Publish the post
WordPress setup#
I copied over default styles to my WordPress template.
I modified some styles settings for code blocks (to avoid margins).
I added styles to make figures slightly larger.