Workshop Reference Sheet

quarto
workshop
tips
Author

Sep Dadsetan

Published

January 27, 2025

Welcome to the Workshop!

Below you’ll find helpful links that will be referenced throughout the workshop. These are handy to have on hand so you can quickly access the resources.

Note

The following “Workshop Setup” will be covered in class, but keep this handy for reference.

Workshop Setup

Setup Walkthrough

Click to expand/collapse
  1. Login in to your Github account

  2. Navigate to the following template repo Repo Template

  3. Click on “Use this template” -> “Create new repo”

  4. In “Repository name”, give it the following <username>.github.io

  5. “Create Repository”

  6. Launch codespace (this will take a ~2.5 minutes)

  7. Once ready…check that quarto is installed -> in terminal quarto --version

  8. If good, type quarto create and you will see something like below:

(base) > quarto create
? Create › project
? Type › website
? Directory › ./
? Title (./)  "<Enter a title for your site>"
Creating project at ...:
  - Created _quarto.yml
  - Created index.qmd
  - Created about.qmd
  - Created styles.css
  1. Run quarto preview to see a preview of your basic site!

Publishing Your Site

Click to expand/collapse

We need to setup the Github repo to render the site from the gh_pages branch.

If it’s a fresh repository, you won’t have a gh_pages branch. So, first we need to create an empty one. To do so, run the following code:

git checkout --orphan gh-pages
git reset --hard # make sure all changes are committed before running this!
git commit --allow-empty -m "Initialising gh-pages branch"
git push origin gh-pages
  • After you finish this, go back to the main branch by running git checkout main. This must be completed before you run quarto publish!

  • Go to our Repo -> “Settings” -> Pages -> Create from branch and make sure gh-pages is selected.

Ta-da! 🎉 Site is published!

Resources

Groups

People

Slides