Session 4
Mickaël CANOUIL, Ph.D.
Corresponding author
Independent Contractor
Monday, the 30th of November, 2026
Monday, the 30th of November, 2026
This session explores Quarto’s project architecture and format ecosystem, covering project types, multi-format optimisation, and template systems for scalable workflows.
By the end of this session, participants will be able to:
Recall the project types introduced in Session 1. Here we examine their configuration and architecture in more detail.
Choose your project type based on your publishing goals:
| Scenario | Project Type | Key Features |
|---|---|---|
| Multiple unrelated documents | default |
Flexible structure, shared metadata |
| Single research paper | manuscript |
Academic formatting, citations, submission-ready |
| Public documentation/blog | website/blog |
Navigation, search, responsive design |
| Long-form content | book |
Cross-chapter references, multiple outputs |
The most flexible option for diverse content:
Optimised for web publishing:
Designed for regular posts and updates:
yaml
project:
type: website
website:
description: "A blog built with Quarto"
site-url: https://your-website-url.example.com # you must change this appropriately for RSS feeds to work properly
title: "Blog"
navbar:
right:
- about.qmd
- icon: github
href: https://github.com/
- icon: bluesky
href: https://bsky.app/
format:
html:
theme:
- cosmo
- brand
css: styles.css
Optimised for academic publishing:
For comprehensive, structured content:
Balance capability with compatibility by configuring format-specific options that leverage each output type’s strengths.
yaml
title: "Multi-Format Document"
2fig-width: 6
fig-height: 4
format:
html:
1 theme: cosmo
code-fold: true
code-tools: true
toc: true
fig-width: 8
fig-height: 6
pdf:
documentclass: article
geometry: margin=1in
fontsize: 11pt
colorlinks: true
typst:
brand-mode: dark
revealjs:
brand-mode: dark
fig-width: 10
fig-height: 6Control what content appears in different output formats.
.content-visible - Show content only for specific formats..content-hidden - Hide content from specific formats.when-format / unless-format - Control visibility based on output format.when-meta / unless-meta - Control visibility based on metadata.when-profile / unless-profile - Control visibility based on profile.Optimise images and assets for different outputs:
Use _metadata.yml for common settings to be shared by documents in a directory:
Organise assets that needs to be copied to the output directory:
Automate workflows before and after rendering.
QUARTO_PROJECT_RENDER_ALL - “1” if rendering entire project.QUARTO_PROJECT_OUTPUT_DIR - Output directory path.QUARTO_PROJECT_INPUT_FILES - List of input files (pre-render).QUARTO_PROJECT_OUTPUT_FILES - List of output files (post-render).Manage project environment variables with files and profiles:
_environment - Default environment variables for all renders._environment.local - Local overrides (auto-ignored by Git)._environment-{profile} - Profile-specific variables._environment.required - Documentation of required variables.Insert dynamic content with shortcodes:
{{< var variable_name >}} - From _variables.yml file.{{< meta field_name >}} - From document YAML metadata.{{< env ENV_VARIABLE >}} - From environment variables.Adapt projects for different scenarios with configuration variants.
_quarto.yml - Base configuration._quarto-{profile}.yml - Profile-specific config that merges with base._environment-{profile} - Profile-specific environment variables.Objective: Transform your computational portfolio from Session 3 into a structured project and explore multiple output formats.
Example Code:
Convert your portfolio into a project:
Create a _quarto.yml file:
Create a _quarto.yml file:
Add multiple output formats to your project:
Add to your _quarto.yml:
Add format-specific options:
Add format-specific content to your documents:
Add to your content:
markdown
Control code display:
Render your project in different formats:
Enhance your project with additional features:
✅ You’ve successfully completed the exercise if you can:
_quarto.yml.