Hello, Quarto
Welcome
Hello world!
Making a professional website has been on my todo list for a long time, and with the recent release of Quarto, I decided this would be a great way to kick Quarto’s tires. And what better way to start than documenting my set up process?
This first post is not too exciting; just some basic setup. There are many ways to set up a Quarto website and they’re well documented at quarto.org. I’m therefore not explaining things in detail for this post, just recording the steps I took.
The next few posts will dig into the nitty gritty details of customizing my site, which is a bit more of an adventure.
Set Up Quarto Project
This assumes:
- You’re using RStudio
- You’ve already set up git and GitHub to play nicely with R/RStudio, and are familiar with the basics (committing and pushing)
- If you need help with this, Happy Git with R by Jenny Bryan and Jim Hester is an excellent resource
- You’ve installed
usethis(not essential, just convenient)
To set up your Quarto project:
- Create a new quarto blog using RStudio
File>New Project>New Directory>Quarto blog
usethis::use_git()- Restart RStudio
- Add
/.quarto/to.gitignore(and commit) - Update
_quarto.yml(and commit)Set output directory
project: type: website output-dir: docsSet website
title(for the site metadata)- Note: this will not update the Title displayed on your homepage - that is set in
index.qmd.
- Note: this will not update the Title displayed on your homepage - that is set in
Update social media icons
- Preview site by clicking
Render
Set Up GitHub Pages
This set up has you rendering locally (into /docs) and then pushing to GitHub and telling GitHub pages where to find your rendered site. I chose this method because it’s simple and it allows me to preview my changes before pushing them to the live site.
In RStudio:
- Render your site (even if you have already previewed, do a complete render now)
- RStudio top right pane >
Build>Render Website
- RStudio top right pane >
- Ensure that the
/docsfolder is being tracked by git - Add an (empty)
.nojekyllfile to the root directory (and commit)- Heads up: this file may not be displayed in the RStudio Files tab (or in your computer’s file browser), unless you’ve enabled display of hidden files. By default, RStudio only displays a few specific hidden files (e.g.
.gitignore).
- Heads up: this file may not be displayed in the RStudio Files tab (or in your computer’s file browser), unless you’ve enabled display of hidden files. By default, RStudio only displays a few specific hidden files (e.g.
usethis::use_github()
On GitHub:
- Set GitHub Pages to use
/docsSettings>Pages>Build and deployment- Source:
Deploy from a branch - Branch:
Main>/docs(and clickSave)
- Source:
- Wait a little bit for the site to update (you can see progress under the
Actionstab) - Check out your new website! (You can find the url under
Settings>Pages)