Reproducible publishing with Quarto
Duke University
Posit, PBC
Posit, PBC
2024-08-04
Option 1: Start the project 3a-websites
.
Option 2: Launch the project in 3a-websites
.
Quarto projects have a _quarto.yml
file
The type
field in this file indicates the type of project:
default
: Collection of documents
website
: Websites (and blogs)
books
: Books 😃
Let’s build a website together from all of the documents we’ve created so far and highlight the following features of Quarto websites:
_quarto.yml
index.qmd
/ landing page
Navigation: left
and right
under navbar
; contents
under sidebar
.
Themes and dark theme toggle
Publishing: quarto publish
Option 1: Go back to the project 3a-websites-books
.
Option 2: Go back to the project in 3a-websites-books
.
Pick up where we left off and
_quarto.yml
for the workshop site. Find something you like and add it to your site.15:00
The freeze
option controls when/if computational documents be re-rendered during a global project render:
The freeze
option is typically added to a _metadata.yml
file within a specific directory, affecting all files in that directory.
For blogs, set freeze
in _metadata.yml
at the root of the posts
directory.
You can have it only within specific subdirectories for more complex sites.
Cache stores the results of computations for a specific file.
Cache invalidation is triggered by changes in chunk source code (or other cache attributes you’ve defined).
cache
can also be set at the chunk level. Consider using the cache for computationally expensive chunks.
See https://quarto.org/docs/publishing for publishing options other than Quarto Pub.
Let’s build a book together from all of the documents we’ve created so far and highlight the following features of Quarto books:
_quarto.yml
index.qmd
/ landing page / change landing page
Add a PDF version
Cross references
Sections
Option 1: Start the project 3b-books
.
Option 2: Launch the project in 3b-books
.
Pick up where we left off and
tables-figures.qmd
) from another chapter.10:00
Any questions / anything you’d like to review before we wrap up this module?