Skip to contents

Copies the bundled inst/extensions/quartifyr/ into <path>/_extensions/quartifyr/. A plain file copy, not a quarto::quarto_add_extension() call: that function only accepts an archive or a GitHub repository as its extension argument, not a bundled local package path, so it isn't the right tool for installing an extension that ships inside this R package itself. Quarto doesn't follow symlinks for extensions (confirmed: quarto render fails outright against a symlinked _extensions/quartifyr/), so a real physical copy is required – the same reason scripts/sync_demo_extension.py keeps the two bundled examples' copies in sync with this package's own canonical one.

Usage

install_quartifyr_extension(path = ".", force = FALSE)

Arguments

path

Target project directory. Defaults to the current directory.

force

Overwrite an existing _extensions/quartifyr/ in path. Default FALSE (errors if one already exists and differs).

Value

The installed extension path (invisibly).

Details

Also runs check_quarto_extensions() (error = FALSE) afterward as a courtesy nudge – quartifyr's own extension layers on top of quarto-plus's ToC/List of Tables/List of Figures/abbreviations machinery, which this function doesn't install itself. Use install_quarto_extensions() for that (it works offline, from the copy bundled in this package).

Examples

if (FALSE) { # \dontrun{
# Requires the quarto CLI on PATH (this function's own follow-up
# check_quarto_extensions() call shells out to it).
install_quartifyr_extension("path/to/project")
} # }