Writes the index of the reference pages into a Quarto file

R/write-reference.R

write_reference_index

Description

Writes the index of the reference pages into a Quarto file

Usage

write_reference_index(
  pkg = ".",
  target_folder = NULL,
  index_file = "index.qmd",
  index_template = NULL,
  quarto_file_path = NULL
)

Arguments

Arguments Description
pkg Path to the root of the R package. Defaults to ".".
target_folder Path to the folder where the Quarto files will be written. Defaults to NULL, which resolves to "reference/" (or the dir value under pkgsite > reference in _quarto.yml if set).
index_file The name assigned to the resulting index Quarto file
index_template The path to a Quarto file that can be used as the template for the index Quarto file
quarto_file_path Path to the folder containing _quarto.yml. Use when the Quarto project root differs from the package root (e.g. the package lives in a sub-folder of a larger Quarto project). Must be a directory path. Defaults to NULL, in which case pkg is used.

Value

A Quarto file that links to the individual Quarto documentation files

Examples

library(pkgsite)
example_pkg <- system.file("example", package = "pkgsite")
write_reference_index(pkg = example_pkg, target_folder = tempdir())
#> 
#> ── pkgsite
#> Creating index file:
#>   `/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T/RtmpgZcQic/index.qmd`

See Also

Other Quarto file creation: write_reference(), write_reference_pages()