Skip to contents

Loads and validates presentation.yaml plus its referenced design.yaml/layouts.yaml (schema shape, layout references, and element box unit strings). Does not merge layouts onto slides or resolve content – see deckifyr.cli's module docstring in the bundled Python source for what validation currently does and does not cover.

Usage

deck_validate(
  presentation,
  strict = TRUE,
  rscript_bin = NULL,
  quarto_bin = NULL,
  soffice_bin = NULL,
  trusted_binaries_only = FALSE,
  allow_outside_project = FALSE
)

Arguments

presentation

Path to presentation.yaml.

strict

Reject unitless geometry when TRUE (default); FALSE is the --warn-only policy from spec section 11.1. Each unitless length it then accepts is reported in $warnings as W_UNITLESS_LENGTH.

rscript_bin, quarto_bin, soffice_bin

Run this executable instead of whatever presentation.yaml's build.reportifyr.flextable.binary, build.quarto.binary or build.preview.binary says (NULL, the default, keeps the project file's own setting). For a launcher that treats project files as untrusted user data (deckifyr.policy).

trusted_binaries_only

If TRUE, a project file that names a non-default binary (and no override was given for it) fails with E_UNTRUSTED_BINARY before anything runs, and design.base, layouts, build.output, build.manifest and build.reportifyr's paths must stay inside the project (E_PATH_OUTSIDE_PROJECT). Default FALSE: existing projects behave exactly as before.

allow_outside_project

With trusted_binaries_only = TRUE, let those paths resolve outside the project (e.g. a shared organization design). Default FALSE.

Value

A parsed list from the CLI's JSON output, e.g. $valid, $slide_count, $layout_count.

Examples

if (FALSE) { # \dontrun{
# Validate the bundled minimal example project (requires a provisioned
# Python/uv/pyro toolchain -- see vignette("getting-started")).
presentation <- system.file(
  "examples", "minimal-deck", "presentation.yaml",
  package = "deckifyr"
)
deck_validate(presentation)
} # }