05:00
The website will mirror your file structure, including subdirectories
/about.qmd
↓
example.com/about.html
/research/project1.qmd
↓
example.com/research/project1.html
What if you want nicer URLs?
example.com/about/
example.com/research/project1/
index.html
By convention, web servers treat index.html
files in a special way.
example.com/about/
implicitly means
example.com/about/index.html
index.qmd
If you want example.com/about/, put your about page in a folder named about and rename it to index.qmd.
/about.qmd
↓
/about/index.qmd
↓
example.com/about/
You could have a blog post like this (ew):
/2025-10-16_blog-post-title.qmd
↓
example.com/2025-10-16_blog-post-title.html
Or like this (yay):
/blog/2025/10/16/blog-post-title/index.qmd
↓
example.com/blog/2025/10/16/blog-post-title/
about.qmd
page appear at about/
05:00
Page layouts
article
: Default layout with main text area between 600px–900pxfull
: Expand main text area into the sidebar and margin area if there’s no content therecustom
: Provide your own HTML template for the main text areaChange the page layout settings for one of your page
Bonus task! Try using the Bootstrap CSS Grid layout system with page-layout: custom
.
Advice:
10:00
Quarto offers a ton of article-specific layout options:
Add an image that spans across the whole page
Add some text to the margin
Advice:
10:00
Sometimes you’ll have a lot of code chunks that take a long time to run.
Quarto will re-run these chunks each time you render the site.
Good for reproducibility! Bad for speed!
Code output is stored in _freeze
Freezing only stores the text of the code output.
Changing the file will force a re-run.
Consider caching if you don’t want the code to re-run (see documentation):
We can automatically add all the pages in a folder to a sidebar:
What if we want fancier automatic pages?
Documentation: https://quarto.org/docs/websites/website-listings.html
research/index.qmd
to be a listing page, showing all the pages in the research
folder.default
, then table
, then grid
.Advice:
10:00
Add metadata to your different research .qmd
files, including images. See how those are reflected in the listing page after rendering.
Bonus task! Modify how the listing page is sorted. Sort it by descending title.
Bonus task! Change how the dates are shown in the listing page with the date-format
option.
Advice:
10:00
Add categories to your different research .qmd
files. See how those are reflected in the listing page after rendering.
Bonus task! Change the category lisit on the listing page to appear as a word cloud.
Advice:
10:00
Multiple listings
Include lists of different document types on the same page (example + code)
YAML lists
Generate listings of items in a YAML file isntead of .qmd
files (example)
Make a blog!
blog
with a file named index.qmd
in it.blog/2025/10/16/thing/index.qmd
, etc.blog/index.qmd
.blog/index.qmd
to your top navigation bar.Advice:
20:00
Quarto has extensions that let you add custom…
Font Awesome icons (site + extension)
Text | Output |
---|---|
{{< fa home >}} |
|
{{< fa wand-magic-sparkles >}} |
|
{{< fa brands apple >}} |
|
{{< fa brands r-project >}} |
|
{{< fa globe >}} |
Use in Markdown:
my-document.qmd
- {{< fa book >}} [Book page](https://www.bayesrulesbook.com/)
- {{< fa person-chalkboard >}} [Teaching resources](https://bayes-rules.github.io/posts/resources/)
- {{< fa brands r-project >}} [R package](https://github.com/bayes-rules/bayesrules) and [package documentation](https://bayes-rules.github.io/bayesrules/docs/)
- {{< fa brands youtube >}} Alicia Johnson, ["Bayes Rules! An Introduction to Bayesian Modeling with R with Alicia Johnson"](https://www.youtube.com/watch?v=MgB1ihuEDN4), presentation for R-Ladies Philly on October 18, 2021
↓
- Book page
- Project page
- R package and package documentation
- Alicia Johnson, “Bayes Rules! An Introduction to Bayesian Modeling with R with Alicia Johnson”, presentation for R-Ladies Philly on October 18, 2021
Use in YAML:
_quarto.yml
↓
Preview Color (extension)
Enable in YAML, either for one page or site-wide:
We use #1696d2
for Democrats and and #db2b27
for Republicans.
↓
We use #1696d2
◉ for Democrats and and #db2b27
◉ for Republicans.
There are hundreds of extensions: find them all at Quarto.org > Extensions or at the Quarto Extensions directory.
Here are some common extensions for websites specifically:
Extension | Description |
---|---|
Font Awesome | Include Font Awesome icons |
Academicons | Include academicons icons |
Custom Callouts | Go beyond Quarto’s default note , warning , important , tip , and caution callouts |
Preview Color | Add little circles to show hex colors |
Embed PDFs | Easily embed PDF files in HTML documents |
Downloadthis | Create download buttons |
Install the Font Awesome extension in your website project.
Use Font Awesome shortcodes:
Install another Quarto extension and play around with it.
Advice:
10:00