For some time I have been looking for ways to incorporate Jupyter notebooks into my blog. I used to blog using Jekyll and while it has great support for code blocks (and otherwise being an awesome blog, it lacks native support for ipynb notebooks.
Using nbconvert to convert a notebook to markdown technically works, but the results aren't always pretty, especially if you have tables (such as pandas dataframe outputs) in your notebooks. You need to add custom CSS for to render tables nicely and I'm not so keen on doing that. One solution I came up with is to convert dataframe outputs to images, which technically works fine, but you need to do that every single time you run a
The next solution I looked at was Kyso, which embeds notebooks in iframes. All you need to do is add the iframe and Kyso will take care of rendering the notebook for you. This results in a better UI, but you need to upload the notebook every time you make an update, which is a little laborious and time consuming.
I then started looking for blog engines within the the Python ecosystem, and found Nikola to be a good fit for my needs. Since I mainly work on Jupyter notebooks I need an engine which has native support for converting them into static html/css which looks clean and readable. I think Nikola handles that seamlessly. Infact, this post is a notebook itself.
In this post I'm going to keep track of changes I made to the default configuration that Nikola comes with. (mainly for me to refer back to it in the future)