Skip to content

Commit

Permalink
Clarify what kind of markdown is allowed (#1203) (#1408)
Browse files Browse the repository at this point in the history
(cherry picked from commit b429117)

Co-authored-by: Charlotte Wickham <charlotte.wickham@posit.co>
  • Loading branch information
github-actions[bot] and cwickham authored Oct 23, 2024
1 parent a0add88 commit 9d350ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/authoring/variables.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `{{{< meta >}}}` syntax used here is an example of a [shortcode](/docs/exten

If you are using a Quarto project, the `var` shortcode enables you to insert content from a project-level `_variables.yml` file. Create this file alongside your `_quarto.yml` project file, and then include references to those variables within any document in your project.

Variables can be either simple values or can include arbitrary markdown content. To define variables, create a `_variables.yml` file in the root directory of your project. For example:
Variables can be either simple values or markdown content. To define variables, create a `_variables.yml` file in the root directory of your project. For example:

``` yaml
version: 1.2
Expand All @@ -38,7 +38,8 @@ engine:
knitr: "[Knitr](<https://yihui.name/knitr>)"
```
Note that the `engine` variable values include markdown for hyperlinks.
Note that the `engine` variable values include markdown for hyperlinks.
Any markdown provided needs to be well-formed, and cannot change the structure of the content around it (e.g. by closing a div opened before the variable inclusion).

To include the value of a variable, use the `{{</* var */>}}` shortcode, for example:

Expand Down

0 comments on commit 9d350ba

Please sign in to comment.