Adding Jupyter Notebooks as Jekyll Blog Posts
I’ve been working a bunch with jupyter notebooks recently, and was looking for an easy way to include the notebooks on this blog to demonstrate code examples easily.
Here is the rough workflow I’ve developed:
- Add and edit jupyter notebooks in a
_notebooks
folder of the blog repository. - Convert it with
jupyter nbconvert --to html notebook.ipynb
. - Move the conversion to the
_posts
folder. - Add the standard Jekyll metadata (title, etc.) with the layout set as
notebook
(this is a custom layout for Jupyter notebooks).
This is a slightly modified workflow from another Jekyll post I found here. The main difference is that I am exporting in HTML, rather than markdown, so the default jupyter notebook HTML formatting for code cells and their output is preserved.
Here is a link to an example post generated from notebook.
Related
Archive
chinese
tang-dynasty-poetry
李白
python
王维
rl
pytorch
numpy
emacs
杜牧
spinningup
networking
deep-learning
贺知章
白居易
王昌龄
杜甫
李商隐
tips
reinforcement-learning
macports
jekyll
骆宾王
贾岛
孟浩然
xcode
time-series
terminal
regression
rails
productivity
pandas
math
macosx
lesson-plan
helicopters
flying
fastai
conceptual-learning
command-line
bro
黄巢
韦应物
陈子昂
王翰
王之涣
柳宗元
杜秋娘
李绅
张继
孟郊
刘禹锡
元稹
youtube
visdom
system
sungho
stylelint
stripe
softmax
siri
sgd
scipy
scikit-learn
scikit
safari
research
qtran
qoe
qmix
pyhton
poetry
pedagogy
papers
paper-review
optimization
openssl
openmpi
nyc
node
neural-net
multiprocessing
mpi
morl
ml
mdp
marl
mandarin
macos
machine-learning
latex
language-learning
khan-academy
jupyter-notebooks
ios-programming
intuition
homebrew
hacking
google-cloud
github
flashcards
faker
docker
dme
deepmind
dec-pomdp
data-wrangling
craftsman
congestion-control
coding
books
book-review
atari
anki
analogy
3brown1blue
2fa