| Title: | Convert the Reference Pages into 'Quarto' Files |
|---|---|
| Description: | Makes it easier to create a 'Quarto' website for an 'R' package. Converts 'R' documentation ('Rd') files into 'Quarto' Markdown documents individually. Supports configuration via the '_quarto.yml' file and groups functions using 'roxygen2' family tags. |
| Authors: | Edgar Ruiz [aut, cre], Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>) |
| Maintainer: | Edgar Ruiz <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-18 11:20:40 UTC |
| Source: | https://github.com/edgararuiz/pkgsite |
Create a Quarto file that lists the available reference pages
index_to_qmd(pkg = ".", template = NULL, quarto_file_path = NULL)index_to_qmd(pkg = ".", template = NULL, quarto_file_path = NULL)
pkg |
Path to the root of the R package. Defaults to |
template |
The path to a Quarto file that can be used as the template
for all of the resulting reference files. If left NULL, |
quarto_file_path |
Path to the folder containing |
A character vector with the contents of a document that links to the converted Quarto documents.
Other Conversion functions:
rd_to_list(),
rd_to_qmd()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") index_to_qmd(pkg = example_pkg)library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") index_to_qmd(pkg = example_pkg)
This function is meant to be used as an intermediate object that could be used as an easy way to convert the information inside the 'Rd' into other formats or outputs.
rd_to_list(path)rd_to_list(path)
path |
The path to the source Rd file |
A list object that contains the contents of the Rd file
Other Conversion functions:
index_to_qmd(),
rd_to_qmd()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") rd_to_list(file.path(example_pkg, "man", "rd_to_list.Rd"))library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") rd_to_list(file.path(example_pkg, "man", "rd_to_list.Rd"))
Converts 'Rd' to Quarto files
rd_to_qmd( path, pkg = ".", examples = TRUE, not_run_examples = FALSE, template = NULL, quarto_file_path = NULL )rd_to_qmd( path, pkg = ".", examples = TRUE, not_run_examples = FALSE, template = NULL, quarto_file_path = NULL )
path |
The path to the source Rd file |
pkg |
Path to the root of the R package. Defaults to |
examples |
Flag that sets the examples code chunk to be evaluated when the Quarto document is rendered |
not_run_examples |
Flag that sets the "do not run" examples code chunk to be evaluated when the Quarto document is rendered |
template |
The path to a Quarto file that can be used as the template
for all of the resulting reference files. If left NULL, |
quarto_file_path |
Path to the folder containing |
A character vector with the resulting contents of converting the Rd file format into a Quarto file format.
Other Conversion functions:
index_to_qmd(),
rd_to_list()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") rd_to_qmd(file.path(example_pkg, "man", "rd_to_qmd.Rd"), pkg = example_pkg)library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") rd_to_qmd(file.path(example_pkg, "man", "rd_to_qmd.Rd"), pkg = example_pkg)
Writes the reference pages and index as Quarto files
write_reference( pkg = ".", target_folder = NULL, examples = TRUE, not_run_examples = NULL, template = NULL, index_file = NULL, index_template = NULL, quarto_file_path = NULL )write_reference( pkg = ".", target_folder = NULL, examples = TRUE, not_run_examples = NULL, template = NULL, index_file = NULL, index_template = NULL, quarto_file_path = NULL )
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 |
examples |
Flag that sets the examples code chunk to be evaluated when the Quarto document is rendered |
not_run_examples |
Flag that sets the "do not run" examples code chunk to be evaluated when the Quarto document is rendered |
template |
The path to a Quarto file that can be used as the template
for all of the resulting reference files. If left NULL, |
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 |
A set of Quarto files written to the specified path based on the number of Rd files in the package, plus an additional one that is the index.
Other Quarto file creation:
write_reference_index(),
write_reference_pages()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference(pkg = example_pkg, target_folder = tempdir())library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference(pkg = example_pkg, target_folder = tempdir())
Writes the index of the reference pages into a Quarto file
write_reference_index( pkg = ".", target_folder = NULL, index_file = "index.qmd", index_template = NULL, quarto_file_path = NULL )write_reference_index( pkg = ".", target_folder = NULL, index_file = "index.qmd", index_template = NULL, quarto_file_path = NULL )
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 |
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 |
A Quarto file that links to the individual Quarto documentation files
Other Quarto file creation:
write_reference(),
write_reference_pages()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference_index(pkg = example_pkg, target_folder = tempdir())library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference_index(pkg = example_pkg, target_folder = tempdir())
Converts the 'Rd' file into Quarto, and writes the file to a specified folder
write_reference_pages( pkg = ".", target_folder = NULL, examples = TRUE, not_run_examples = FALSE, template = NULL, quarto_file_path = NULL )write_reference_pages( pkg = ".", target_folder = NULL, examples = TRUE, not_run_examples = FALSE, template = NULL, quarto_file_path = NULL )
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 |
examples |
Flag that sets the examples code chunk to be evaluated when the Quarto document is rendered |
not_run_examples |
Flag that sets the "do not run" examples code chunk to be evaluated when the Quarto document is rendered |
template |
The path to a Quarto file that can be used as the template
for all of the resulting reference files. If left NULL, |
quarto_file_path |
Path to the folder containing |
A set of Quarto files written to the specified path based on the number of Rd files in the package.
Other Quarto file creation:
write_reference(),
write_reference_index()
library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference_pages(pkg = example_pkg, target_folder = tempdir())library(pkgsite) example_pkg <- system.file("example", package = "pkgsite") write_reference_pages(pkg = example_pkg, target_folder = tempdir())