Image credit: Unsplash

Display Jupyter Notebooks with academia

Learn how to blog in academia using Jupyter notebooks

from IPython.core.display import Image


print("Welcome to academia!")
Welcome to academia!

Install Python and Jupyter

Install Anaconda which includes Python 3 and Jupyter notebook.

Otherwise, for advanced users, install Jupyter notebook with pip3 install jupyter.

Create a new blog post as usual

Run the following commands in your Terminal, substituting <MY_WEBSITE_FOLDER> and my-post with the file path to your academia website folder and a name for your blog post (without spaces), respectively:

hugo new  --kind post post/my-post
cd <MY_WEBSITE_FOLDER>/content/post/my-post/

Create or upload a Jupyter notebook

Run the following command to start Jupyter within your new blog post folder. Then create a new Jupyter notebook (New > Python Notebook) or upload a notebook.

jupyter notebook

Convert notebook to Markdown

jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_files_dir=.

# Copy the contents of and append it to
cat | tee -a

# Remove the temporary file:

Edit your post metadata

Open in your text editor and edit the title etc. in the front matter according to your preference.

To set a featured image, place an image named featured into your post’s folder.

For other tips, such as using math, see the guide on writing content with academia.

Dr. Christian Pfeiffer
PhD in Cognitive Neuroscience, MSc in Psychology

I am passionate about supporting university professors in their personal development and on the topic of leadership. With a background in psychology and cognitive neuroscience, and 10+ years experience as academic scholar, my consulting combines theoretical depth and practical relevance to help leaders excell in their professional career development. Expertise: Psychology, Cognitive Neuroscience, Computer Science, Robotics. Interests: Leadership, Personal Development