Introductory Note
Jupyter notebooks allow for the combination of code and text to make a cohesive guide on subjects related to programming. It’s important to know how to make them, hence the reason for this guide. This hack itself is a jupyter notebook!
Set Up The File
- Make a new file in
_notebook
- Name the file
year-month-day-name_of_notebook.ipynb
Now that you have a file to work with, you need to set up the preliminary data of the file.
---
toc: true
comments: false
layout: post
title: Name of Notebook
description: description of notebook
type: hacks
courses: { week: {week: week goes here} }
---
Adding Content
You’ll see that the formatting for a jupyter notebook is different than other files. Text is separated into different blocks. These different allows for the code to be put into different places, so they don’t intermingle, and can display without issue.
For displaying actual code, it’s best to make the block classified as plain text as the code will actually do what its told otherwise. This means you won’t actually see the code but the result of the code. In some cases, this is what you want, but for many other scenarios, you don’t want this.
This is what you had to do to add the data above. You had to make a Markdown block and put your code in there.