Framework for Python

Notebooks & Scripts

quarto_regenerate()

Rewrite the project's Quarto configuration from its settings, backing up the old files.

The files are generated by quarto_generate_all() from project_type, render_dirs, quarto, and directories in the settings. The _quarto.yml and _metadata.yml files in the render folders are removed first, so an older project's per-folder files don't linger.

Usage

quarto_regenerate(project_path: str | Path, backup: bool = True) -> RegenerateResult

Arguments

Name Type Default Description
project_path required str | Path

The project's root folder, which must hold settings.yml or config.yml.

backup bool True

Copy every existing _quarto.yml and _metadata.yml into a timestamped folder under .quarto_backups/ first.

Value

The files written, the backed-up files' paths relative to the project root, and the backup folder (None without backup).

Raises

  • FrameworkError: When the project has no settings file, or its settings turn the Quarto tool off.