Quarto Projects & Websites
are directories that provide the ability to…
render all or some of the files in a directory with a single command (e.g. quarto render myproject
)
share a YAML configuration across multiple documents
redirect output artifacts to another directory
freeze rendered output (i.e. don’t re-execute documents unless they have changed)
Use the quarto create project
command (in the terminal) to create a new project:
Our website would come pre-populated with five initial files:
Let’s talk about each file!
.Rproj
– Where does your analysis live?R has a powerful notion of a working directory–where R looks for files that you ask it to load, and where it will store any files that you ask it to save.
R for Data Science
RStudio shows your current working directory at the top of the console:
.Rproj
– Where does your analysis live?Keeping all the files associated with a given project (data, R scripts, figures, etc.) together in one directory is such a wise and common practice that RStudio has built-in support for this via RStudio projects (.Rproj
).
Inside a .Rproj
, you can access files using a relative path. Absolute paths should never be used!
If I wanted to access the students.xlsx
file in the data
folder of my project, I could use data/students.csv
to access these data.
This is different from the full path (where the file lives on my computer): /Users/atheobol/Desktop/trial-website/data/students.csv
.
.css
A Cascading Style Sheets (CSS) file is a style sheet language used in web development to describe the presentation and formatting of documents written in HTML or XML.
index.qmd
This is the home page for the website!
Whatever you place in the index.qmd
file will be the first page people see!
This page is also accessed using the top navigation menu (on the left side) using the link titled “Home.”
about.qmd
.yml
file doesn’t give this page a name, so it defaults to the title included in the about.qmd
document.Here is a list of every theme available for Quarto websites: https://quarto.org/docs/output-formats/html-themes.html
Projects
Are students already completing a project that includes R?
Why not transform this project into something they can publish?
Personal Websites
Giving students a way to advertise themselves!
https://mattbabb737.github.io/