# TITLE: Good news, everyone! # COVER: https://i.imgur.com/rb4AkBa.jpg # DATE: 2020-06-13 # TAGS: announcement,static website generator from matplotlib import pyplot as plt import pandas as pd %matplotlib inline
/home/stewart/.pyenv/versions/3.7.5/lib/python3.7/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError. warnings.warn(msg)
It's fun to write stuff. But as a software engineer, I always felt like every tool I use to write was a little bit off. But that changed recently. Writing things on a Jupyter notebook became my new habit and I love it. It is powerful to use both Markdown and code/MathJax interactively without going back and forth between your terminal and Markdown editor.
However, a new problem arises with this new habit of mine. While Markdown is widely supported in many statically generated publication solutions (e.g. Jekyll), Jupyter notebooks are not the easiest thing you can use for a blog post. The ones that do support Jupyter notebooks are either pretty complex to set up or not to my liking. So I decided to write a new one just for me.
The first cell of the notebook holds meta info like below, which will be parsed and used to generate indices:
# TITLE: the blog title # COVER: the cover picture URL # DATE: the date # TAGS: tag a,tag b,...
But showing the above cell in the content will be very noisy, so you can add special cell tags to hide the input, or the output, or both! (
And then you can continue writing your code, with some Markdown cells here and there. Viola! The below cells are examples:
2 rows × 100 columns
plt.plot([x ** 2 for x in range(100)])
[<matplotlib.lines.Line2D at 0x7f33bcaed190>]
The blog templates are custom built for my blog, but it is customizable for your blog as well. If you want to use this for your blog, please check out the Github repo.
The good news is that I have some bad news for you: I started my blog again.