Hello jupyter notebook -> html

What am I doing here?

I have decided to use jupyter notebooks to present some things that I find useful. For the moment, I will stick to the wordpress blog platform, but I am in the progress of creating a website using flask and put everything there.

Convert jupyter notebook to html

In the terminal, go to the relevant folder and type:

jupyter nbconvert --to html --template basic jupyter_to_html.ipynb

The --template basic is used to avoid including lots of CSS lines that would interfere with the wordpress’s CSS. The page remains unresponsive for some time if I do not use this command.

Paste the generated html in wordpress

Using the HTML interface, paste the generated jupyter_to_html.html code.

Adding CSS

The disadvantage for not including CSS makes the use of jupyter notebooks pointless.
In prooffreaderplus, it describes how to use a CSS stylesheet to make the jupyter notebook look pretty:

<style type="text/css">
.highlight{background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .1em;padding:0em .5em;border-radius: 4px;}
.k{color: #338822; font-weight: bold;}
.kn{color: #338822; font-weight: bold;}
.mi{color: #000000;}
.o{color: #000000;}
.ow{color: #BA22FF;  font-weight: bold;}
.nb{color: #338822;}
.n{color: #000000;}
.s{color: #cc2222;}
.se{color: #cc2222; font-weight: bold;}
.si{color: #C06688; font-weight: bold;}
.nn{color: #4D00FF; font-weight: bold;}
</style>

I do not use this right now.

Notes

This first blog post only includes Markdown, and using jupyter notebooks to write in Markdown and then convert to html is really useful.

Have a look here at github and predictablynoisy and prooffreaderplus