Getting Started with Jupyter Notebook and Quarto
January 27, 2025
Jupyter Notebook, Quarto, and GitHub-based Discussion Boards use markdown as its underlying document syntax.
Let’s do Classwork 2.
---
.
When we knit the document, Quarto sends the .qmd
file to jupyter/knitr, which executes all of the code chunks and creates a new markdown (.md
) document which includes the code and its output.
The markdown file (*.md
) generated by jupyter/knitr is then processed by pandoc, which is responsible for creating the output file.
- SOME_TEXT
in “.md” is equivalent to <ul><li> SOME_TEXT </li>
in ”.html”html
output format in the YAML metadata of our document.
format: html
is set.Download the Jupyter Notebook file, danl-210-python-basic.ipynb
from Brightspace, and open it from Google Colab (or VSCode if you prefer).
The above syntax is part of YAML metadata in danl-210-python-basic.ipynb
.
In YAML, indentation really matters!
_quarto.yml
USERNAME.github.io.Rporj
.
Project: (None)
at the top-right corner.USERNAME.github.io.Rproj
._quarto.yml
configures a website, and provides various options for HTML documents within the website.The Render button (command/Ctrl + shift + K) renders a single Quarto document file (e.g., index.qmd
) to create an output document.
quarto render
from Terminal renders ALL Quarto documents and Jupyter Notebook files in your local working directory:
quarto render
should be used if there is any change in _quarto.yml
.Tip
_quarto.yml
, *.qmd
, or *.ipynb
files ONLY from your local laptop or Google Colab.
*.ipynb
to a Quarto websiteBy default, quarto render
doesn’t execute any code in .ipynb
notebooks.
quarto render
renders .ipynb
notebooks, so that corresponding html
files are rendered.
*.ipynb
, run that *.ipynb
on Google Colab, save the notebook, and download it to your local working directory.theme
specifies the Bootstrap theme to use for the page (themes are drawn from the Bootswatch theme library).
default
, bootstrap
, cerulean
, cosmo
, darkly
, flatly
, journal
, lumen
, paper
, readable
, sandstone
, simplex
, spacelab
, united
, and yeti
.highlight-style
specifies the code highlighting style.
default
, tango
, pygments
, kate
, monochrome
, espresso
, zenburn
, haddock
, breezedark
, and textmate
.index.qmd
sets a front page about you.
jolla
trestles
solana
marquee
broadside
navbar
in _quarto.yml
We can also create a drop-down menu by including a menu
More details about navbar are available here: