Learn R Programming

froggeR (version 0.6.0)

quarto_project: Create a Custom Quarto Project

Description

This function creates a new Quarto project directory with additional froggeR features. It first calls quarto::quarto_create_project() to set up the basic structure, then enhances it with froggeR-specific files and settings.

Usage

quarto_project(name, path = here::here(), example = TRUE)

Value

Invisibly returns the path to the created project directory.

Arguments

name

Character. The name of the Quarto project directory and initial .qmd file. Must contain only letters, numbers, hyphens, and underscores.

path

Character. Path to the parent directory where project will be created. Default is current project root via here.

example

Logical. If TRUE (default), creates a Quarto document with brand logo positioning and examples of within-document cross-referencing, links, and references.

Details

This function creates a Quarto project with the following enhancements:

  • _brand.yml: Stores Quarto project branding

  • logos: Quarto project branding logos directory

  • _variables.yml: Stores reusable YAML variables

  • .gitignore: Enhanced settings for R projects

  • README.md: Template README file

  • dated_progress_notes.md: For project progress tracking

  • custom.scss: Custom Quarto styling

  • references.bib: Bibliography template

The function requires Quarto version 1.6 or greater. Global froggeR settings are automatically applied if available.

See Also

write_quarto, settings, brand_settings, write_brand, write_variables, save_brand, save_variables

Examples

Run this code
if (interactive() && quarto::quarto_version() >= "1.6") {

  # Create the Quarto project with custom YAML & associated files
  quarto_project("frogs", path = tempdir(), example = TRUE)

  # Confirm files were created
  file.exists(file.path(tempdir(), "frogs", "frogs.qmd"))
  file.exists(file.path(tempdir(), "frogs", "_quarto.yml"))

}

Run the code above in your browser using DataLab