Hello, World!
27 May 2016This is a test of using Jekyll and Jupyter together to make a blog. We'll set the title by adding a bit of metadata to the Notebook (this can be changed from Edit → Edit Notebook Metadata):
"jekyll": {
"name": "Hello, World!"
}
We can plot things in blog posts in the usual way, with the familiar Jupyter Notebook commands.
In [1]:
%matplotlib inline
In [2]:
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot-rq')
In [3]:
xs = np.linspace(0, 10, 201)
plt.plot(xs, np.cos(xs))
Out[3]:
Once we're done, we can use nbconvert
to turn everything into a Jekyll-ready HTML page.
In [4]:
!jupyter nbconvert --to html --template jekyll.tpl 2016-05-27-hello-world.ipynb
This should be fun!