Workshop Reference Sheet
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.
The following “Workshop Setup” will be covered in class, but keep this handy for reference.
Workshop Setup
Setup Walkthrough
Click to expand/collapse
Login in to your Github account
Navigate to the following template repo Repo Template
Click on “Use this template” -> “Create new repo”
In “Repository name”, give it the following
<username>.github.io
“Create Repository”
Launch codespace (this will take a ~2.5 minutes)
Once ready…check that quarto is installed -> in terminal
quarto --version
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
- 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 runquarto publish
!Go to our Repo -> “Settings” -> Pages -> Create from branch and make sure
gh-pages
is selected.
Ta-da! 🎉 Site is published!