This function creates a new Quarto document (.qmd
file) with either a custom
or standard YAML header. When using a custom header, it integrates with
_variables.yml
for reusable metadata across documents.
Usage
write_quarto(
filename = "frogs",
path = getwd(),
custom_yaml = TRUE,
initialize_project = FALSE
)
Arguments
- filename
Character string. The name of the file without the '.qmd' extension. Only letters, numbers, hyphens, and underscores are allowed.
- path
Character string. The directory where the file will be created. Defaults to the current working directory.
- custom_yaml
Logical. If TRUE (default), creates a Quarto document with a custom YAML header using values from '_variables.yml'. If FALSE, creates a standard Quarto document with basic YAML headers.
- initialize_project
Logical. Set to TRUE when used within a Quarto project (internal use).
Details
When custom_yaml = TRUE
and initialize_project = FALSE
,
the function will:
Create or update
_variables.yml
for document metadataCreate
custom.scss
for document styling (if it doesn't exist)Create
_quarto.yml
for project configuration (if it doesn't exist)
Existing files will not be modified. For Quarto styling options, see https://quarto.org/docs/output-formats/html-themes.html.
If froggeR settings don't exist and custom_yaml = TRUE
, the function will
prompt the user to create settings using froggeR_settings()
.