Skip to content

Instantly share code, notes, and snippets.

@terencezl
terencezl / jekyll.py
Last active August 29, 2015 14:08 — forked from cscorley/jekyll.py
A few key strokes to convert IPython notebooks to markdown and serve in Jekyll, per http://cscorley.github.io/2014/02/21/blogging-with-ipython-and-jekyll/. Pics and GitHub markdown style triple backtick code blocks with line numbers are supported.
try:
from urllib.parse import quote # Py 3
except ImportError:
from urllib2 import quote # Py 2
import os
import sys
try:
BLOG_DIR = os.environ['BLOG_DIR']
except KeyError: