04:00
WiFi: Posit Conf 2025 Password: conf2025
Find the materials at: pos.it/quarto-brand-conf25
Make sure you’ve:
From the event portal, click “Join the server”, find our channel: #workshop-quarto-brand
Time | Activity |
---|---|
9:00 - 10:30 | Intro to Quarto & brand.yml |
10:30 - 11:00 | Coffee break ☕️ |
11:00 - 12:30 | Presentations & Dashboards |
12:30 - 1:30 | Lunch break 🍽️ |
1:30 - 3:00 | PDFs & Websites |
3:00 - 3:30 | Coffee break ☕️ |
3:30 - 5:00 | Customizing your brand |
Data Science Educator
Developer Relations, Posit
Sr. Product Marketing Manager
Developer Relations, Posit
Gordon Woodhull
Software Engineer, Quarto
Christophe Dervieux
Software Engineer,
R Markdown and Quarto
These materials are pitched at someone who:
Knows some R or Python
Wants to create outputs that weave text and code
Relatively new to Quarto
Wants to learn about branded Quarto
We’ll teach you
What Quarto is
How to create documents, dashboards, websites, and presentations with Quarto
How to brand those Quarto outputs with brand.yml
My turn
Your turn
🟥 “I’m stuck and need help!”
🟩 “I finished the exercise”
Introduce yourself to your neighbors:
04:00
Introduction to Quarto
Quarto documents
Authoring Quarto
Theme with brand.yml
Quarto is an…
open-source
scientific and technical
publishing system
built on Pandoc.
you can weave together narrative and code to produce elegantly formatted output such as documents, web pages, blog posts, books, dashboards, and more.
Vote Idaho Election Page by Andrew Heiss (Department of Public Management and Policy, Georgia State University) and the Idaho Secretary of State
Council Housing & Neighborhood Income Inequality in Vienna by Tamara Premrov and Matthias Schnetzer (European Centre for Social Welfare Policy and Research, Austria)
Navigating Hostility: The Effect of Nonprofit Transparency and Accountability on Donor Preferences in the Face of Shrinking Civic Space by Suparna Chaudhry (Lewis & Clark College, International Justice Lab at College of William & Mary) et al.
Duplicating Quarto elements with code templates to reduce copy and paste errors by Althea A. Archer (United States Geological Survey)
We Converted Our Documentation to Quarto by Melissa Van Bussel (Statistics Canada)
This is what you’ll work on today!
Feature | Quarto |
---|---|
Basic Formats | html, pdf, docx, typst |
Beamer | beamer |
PowerPoint | pptx |
HTML Slides | revealjs |
Advanced Layout | Quarto Article Layout |
Cross References | Quarto Crossrefs |
Websites & Blogs | Quarto Websites, Quarto Blogs |
Books | Quarto Books |
Interactivity | Quarto Interactive Documents |
Journal Articles | Journal Articles |
Dashboards | Quarto Dashboards |
Quarto is a command line interface (CLI) that renders plain text formats (.qmd
, .rmd
, .md
) OR mixed formats (.ipynb
/Jupyter notebook) into static PDF/Word/HTML reports, books, websites, presentations and more.
Usage: quarto
Version: 1.8.24
Description:
Quarto CLI
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
Commands:
render [input] [args...] - Render files or projects to various document types.
preview [file] [args...] - Render and preview a document or website project.
serve [input] - Serve a Shiny interactive document.
create [type] [commands...] - Create a Quarto project or extension
create-project [dir] - Create a project for rendering multiple documents
convert <input> - Convert documents to alternate representations.
pandoc [args...] - Run the version of Pandoc embedded within Quarto.
typst [args...] - Run the version of Typst embedded within Quarto.
run [script] [args...] - Run a TypeScript, R, Python, or Lua script.
add <extension> - Add an extension to this folder or project
install [target...] - Installs an extension or global dependency.
publish [provider] [path] - Publish a document or project to a provider.
check [target] - Verify correct functioning of Quarto installation.
help [command] - Show this help or the help of a sub-command.
jupyter
or knitr
evaluates Python, Julia, R, or Observable code and returns a .md
file along with the evaluated code.md
file by Pandoc and converted to a final output formatIllustration by Allison Horst
Let’s walk through your options for today.
Go to the workshop website and click on Setup
in the sidebar.
Follow the setup instructions at the bottom.
05:00
.qmd
file.Cmd/Ctrl + Shift + K
01-exercise-r.qmd
or 01-exercise-py.qmd
.05:00
Introduction to Quarto
Quarto documents
Authoring Quarto
Theme with brand.yml
.qmd
file format with three components:
YAML: Metadata
Text: Markdown
Code: R, Python, Observable, and Julia
Weave it all together, and you have beautiful, powerful, and useful outputs!
Metadata: YAML
Text: Markdown
my-document.qmd
Text: Markdown
The `whr_2025.csv` dataset contains data from the [**2025 World Happiness Report**](https://www.worldhappiness.report/).
The whr_2025.csv
dataset contains data from the 2025 World Happiness Report.
Text: Markdown
Markdown syntax | Output |
---|---|
|
italics and bold |
|
superscript2 / subscript2 |
|
|
|
verbatim code |
Code
Code
{}
Inline code executes code within Markdown
my-document.qmd
Results in:
The number of countries in the dataset is 147.
Code can include optional chunk options, in YAML style, identified by #|
at the beginning of the line
Code can include optional chunk options, in YAML style, identified by #|
at the beginning of the line
Option | Description |
---|---|
eval |
Evaluate the code chunk |
echo |
Include the source code |
warning |
Include warnings |
include |
Include code and results |
Other options: https://quarto.org/docs/computations/execution-options.html
01-exercise-r.qmd
and run the first three code chunks (in order).#| include: false
chunk option to the second chunk (global-trends
). Preview the file and note the differences.author
field and add your name. Preview the file.code-fold
to be true
. Preview the file.**
and (2) use inline code instead of hardcoded values for the number of countries. You can use the following code to calculate the number of countries.05:00
Introduction to Quarto
Quarto documents
Authoring Quarto
Theme with brand.yml
Markdown syntax | Output | |
---|---|---|
|
https://quarto.org | |
|
Quarto | |
|
![]() |
Right | Left | Default | Center |
---|---|---|---|
12 | 12 | 12 | 12 |
123 | 123 | 123 | 123 |
1 | 1 | 1 | 1 |
Right | Left | Default | Center |
---|---|---|---|
12 | 12 | 12 | 12 |
123 | 123 | 123 | 123 |
1 | 1 | 1 | 1 |
For further customization, you can add classes, attributes, and other identifiers to content using divs and spans.
Divs
::: {.border}
This adds the "border" class to some content.
:::
Spans
[This is some text]{.class key="val"}
Callout blocks
my-document.qmd
Tip
Note that there are five types of callouts, including: note
, tip
, warning
, caution
, and important
.
Multiple columns
my-document.qmd
::: {layout-ncol=2}

Photo by <a href="https://unsplash.com/@nypl?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">The New York Public Library</a> on <a href="https://unsplash.com/photos/planet-earth-close-up-photography-yEauzeZU6xo?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>
:::
Photo by The New York Public Library on Unsplash
Tabsets
my-document.qmd
This is text that is red.
important
callout box to the introduction summarizing the report’s findings."#eb068c"
.05:00
Introduction to Quarto
Quarto documents
Authoring Quarto
Theme with brand.yml
Quarto includes 25 themes from the Bootswatch project:
Provide the custom theme under theme
in the YAML heading:
Unified branding with a simple YAML file
Create reports, apps, dashboards, plots and more that match your company’s brand guidelines with a single _brand.yml
file.
Learn more: https://posit-dev.github.io/brand-yml/
Branding can be frustrating
But brand.yml makes it easier
1. Define branding in a single _brand.yml
file.
2. Apply that branding across almost all Quarto formats.
brand.yml
also works with Shiny!
--- config: look: handDrawn theme: neutral --- flowchart LR by{brand.yml} by-->quarto[Quarto] quarto-->quarto-html quarto-->quarto-pdf quarto-html-->quarto-websites[Websites] quarto-html-->quarto-presentations[Presentations] quarto-html-->quarto-dashboards[Dashboards] quarto-html-->quarto-emails[Emails] quarto-pdf-->quarto-typst[Typst] by-->R R-->r-bslib["{bslib}"] r-bslib-->r-thematic["{thematic}"] r-bslib-->r-shiny["Shiny for R"] r-bslib-->r-rmd["R Markdown"] r-bslib-->r-pkgdown["pkgdown"] %% r-thematic-->r-ggplot2["{ggplot2}"] %% r-thematic-->r-plot["{plot}"] by-->Python Python-->py-brand_yml["brand_yml"] py-brand_yml-->py-shiny[Shiny for Python] py-brand_yml-->py-plots[seaborn, matplotlib, etc.] classDef implemented fill:#8CE3A0,stroke:#0A2911,color:#0A2911; classDef partial fill:#A8E5B9,stroke:#4B8A5D,color:#0A2911; classDef in-progress fill:#B3D7FF,stroke:#00254D,color:#00254D; classDef highlighted fill:#FFE8DB,stroke:#612200,color:#612200; class quarto-websites,quarto-presentations,quarto-dashboards,quarto-typst,py-brand_yml,py-shiny,r-bslib,r-shiny,r-rmd,r-pkgdown implemented; class r-thematic,py-plots partial; class by highlighted; click quarto href "https://prerelease.quarto.org/docs/authoring/brand.html" click quarto-typst href "https://quarto.org/docs/output-formats/typst.html" "Typst in Quarto" click quarto-presentations href "https://quarto.org/docs/presentations/revealjs/" "Reveal.js in Quarto" click quarto-dashboards href "https://quarto.org/docs/dashboards/" "Dashboards in Quarto" click r-shiny href "https://shiny.posit.co/" click r-bslib href "https://rstudio.github.io/bslib/" click r-thematic href "https://rstudio.github.io/thematic/" click r-ggplot2 href "https://ggplot2.tidyverse.org/" click r-rmd href "https://rmarkdown.rstudio.com/" click py-shiny href "https://shiny.posit.co/py/" click py-brand_yml href "pkg/py/"
Learn more: https://posit-dev.github.io/brand-yml/
meta
: Identifying information, name of the company, URLs, etc.logo
: Files or links to the brand’s logos.color
: Colors in the brand’s color palette.typography
: Fonts for different elements.defaults
: Additional context-specific settings._brand.yml
structure_brand.yml
meta:
name: World Happiness Report
link:
home: https://www.worldhappiness.report/
logo:
images:
icon:
path: images/whr_logo.png
alt: World Happiness Report icon.
small: images/whr_logo.png
color:
palette:
dark-purple: "#93358c"
light-purple: "#f8f6fb"
teal: "#04afaf"
dark-blue: "#086992"
hot-pink: "#eb068c"
light-blue: "#1aade4"
background: light-purple
foreground: black
primary: dark-purple
secondary: hot-pink
tertiary: light-blue
dark: black
typography:
fonts:
- family: Libre Franklin
source: google
weight: [400, 700]
base:
family: Libre Franklin
weight: 400
headings:
family: Libre Franklin
weight: 700
color: dark-purple
link:
color: primary
decoration: none
_brand.yml
.Quarto will detect the presence of _brand.yml
and automatically apply the brand to all documents of the supported formats in the project.
If your brand file has a different name or lives in a subdirectory, use the brand
key.
To turn off brand.yml for a document, use brand: false
.
brand
shortcodeAccess some brand.yml values with a shortcode.
In the workshop repo, there’s a file named 04-exercise.yml
. Rename the file to _brand.yml
and rerender your Quarto document. What changes?
Change some of the variables in the _brand.yml
file and rerender to see how your theme changes. You can reset the file by copying and pasting it from here.
05:00
The quarto packages contain theme helpers that apply branding to plots.
In the first code chunk of 01-exercise-r.qmd
, replace theme_minimal()
with theme_brand_ggplot2()
. You will need to supply a brand file path ("_brand.yml"
).
Re-render and see what changes.
In the first code chunk of 01-exercise-python.qmd
, add theme_brand_plotnine()
right after theme_minimal()
. You will need to supply a brand file path ("_brand.yml"
).
Re-render. Does anything change? What if you change foreground
in _brand.yml
to hot-pink
? Re-render with and without theme_brand_plotnine()
.
05:00
Access and apply specific brand elements.
Use the R or Python brand.yml package to create a brand file from a string.
_brand.yml
with read_brand_yml()
(R) or Brand.from_yaml()
(Python) to a variable named brand
.teal
color. Use code like the following.(Make sure to first remove #| include: false
from the chunk, if it’s still there).
05:00