From d5e88730d9807b3f1453cdcdd0f65afb39ae5ffe Mon Sep 17 00:00:00 2001 From: George Stagg Date: Mon, 12 Aug 2024 14:39:20 -0700 Subject: [PATCH] Docs: Update Document YAML Options --- docs/reference/document-yaml.qmd | 35 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/reference/document-yaml.qmd b/docs/reference/document-yaml.qmd index ce0d728..c601e73 100644 --- a/docs/reference/document-yaml.qmd +++ b/docs/reference/document-yaml.qmd @@ -1,11 +1,12 @@ --- title: Document YAML Options +toc: true format: html --- -{{< include ../_extensions/r-wasm/live/_knitr.qmd >}} +The `quarto-live` extension can be configured using YAML options. There are three main option keys of interest: `webr`, `pyodide` and `live`. -The `quarto-live` extension can be configured using Quarto document YAML options. There are three top-level keys: `webr`, `pyodide` and `live`. +For a single document, the config options can be set at the top level in your document's YAML front matter. For Quarto projects, the options should be set under the `live-` format key to ensure that Quarto's project-level metadata merging is successful. ## Options Reference @@ -47,21 +48,21 @@ A fully-configured document might look something like this: ```{.yaml filename="live-document.qmd"} --- title: An Example -format: live-html +format: + live-html: + webr: + packages: + - ggplot2 + - mypackage + repos: + - https://myrepo.example.com/ + pyodide: + cell-options: + edit: false + packages: + - matplotlib + live: + show-solutions: false resources: datadir -webr: - packages: - - ggplot2 - - mypackage - repos: - - https://myrepo.example.com/ -pyodide: - cell-options: - edit: false - packages: - - matplotlib -live: - show-solutions: false --- ``` -