+++ title = "Display Jupyter Notebooks with Academic" subtitle = "Learn how to blog in Academic using Jupyter notebooks" summary = "Learn how to blog in Academic using Jupyter notebooks" date = 2019-02-05T00:00:00Z draft = false
["Bob Smith", "David Jones"]
.authors = ["admin"]
tags = []
for no tags, or the form tags = ["A Tag", "Another Tag"]
for one or more tags.tags = [] categories = []
projects = ["deep-learning"]
referencescontent/project/deep-learning/index.md
.projects = []
.featured.jpg/png
to your page's folder.[image] # Caption (optional) caption = ""
# Focal point (optional) # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight focal_point = "" +++
from IPython.core.display import Image
Image('https://www.python.org/static/community_logos/python-logo-master-v3-TM-flattened.png')
print("Welcome to Academic!")
Welcome to Academic!
Install Anaconda which includes Python 3 and Jupyter notebook.
Otherwise, for advanced users, install Jupyter notebook with pip3 install jupyter
.
Run the following commands in your Terminal, substituting <MY_WEBSITE_FOLDER>
and my-post
with the file path to your Academic website folder and a name for your blog post (without spaces), respectively:
cd <MY_WEBSITE_FOLDER>
hugo new --kind post post/my-post
cd <MY_WEBSITE_FOLDER>/content/post/my-post/
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
jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_files_dir=.
# Copy the contents of Untitled.md and append it to index.md:
cat Untitled.md | tee -a index.md
# Remove the temporary file:
rm Untitled.md
Open index.md
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 Academic.