Skip to contents

Render a Quarto document as a Nix derivation

Usage

rxp_quarto(
  name,
  qmd_file,
  additional_files = "",
  nix_env = "default.nix",
  args = ""
)

Arguments

name

Symbol, derivation name.

qmd_file

Character, path to .qmd file.

additional_files

Character vector, additional files to include.

nix_env

Character, path to the Nix environment file, default is "default.nix".

args

A character of additional arguments to be passed directly to the quarto command.

Value

A list with elements: name, the name of the derivation, snippet, the Nix boilerplate code, type, additional_files and nix_env.

Details

Detects rxp_read("ref") in the .qmd file and replaces with derivation output paths.

Examples

if (FALSE) { # \dontrun{
  # `images` is a folder containing images to include in the Quarto doc
  rxp_quarto(name = report, qmd_file = "doc.qmd", additional_files = "images", args = "-- to typst")
} # }