-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Starting with v1.2, Quarto supports project profiles that let you customize overall project _quarto.yml files for specific situations, like production vs. development, or basic book vs. advanced book. For instance, these three YAML files define two different versions of a document (here with different authors):
_quarto.yml
project:
output-dir: _output
profile:
default: basic_quarto-basic.yml
author: Basic author
format:
html:
output-file: "basic.html"_quarto-advanced.yml
author: Advanced author
format:
html:
output-file: "advanced.html"testing.qmd
---
title: "Testing"
---
Test.It's possible to switch profiles either with environment variables…
export QUARTO_PROFILE=advanced
quarto render .…or a command line switch:
quarto render . --profile advancedIt would be helpful to be able to specify the desired profile(s) in quarto_render() and quarto_preview(). Right now it just uses whatever is set to the default (basic in this example). It could be helpful to control environments in order to create different outputs for multiple profiles. For instance, something like this could be added to a sort of rendering script and generate basic and advanced versions of the document simultaneously:
quarto::quarto_render(".", profile = "basic") # Create basic.html
quarto::quarto_render(".", profile = "advanced") # Create advanced.htmlAn argument like this would also allow wrapper packages like tarchetypes::tar_quarto() to use specific profiles (see ropensci/tarchetypes#139 for a similar issue for adding profile support for {targets})
Metadata
Metadata
Assignees
Labels
Type
Projects
Status