Skip to content

Commit bf5b5cb

Browse files
authored
docs: add "version" shortcode (#1586)
* docs: add "version" shortcode Fixes quarto-dev/quarto-cli#11379 * refactor: use the escaped shortcode instead of only the name
1 parent 60f4ffb commit bf5b5cb

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/authoring/_shortcodes.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Quarto supports several shortcodes natively:
1414

1515
| Shortcode | Description |
1616
|---------------------------------------------------------------|------------------------------------------|
17+
| [version](/docs/authoring/version.qmd) | Print Quarto CLI version |
1718
| [var](/docs/authoring/variables.qmd#var) | Print value from `_variables.yml` file |
1819
| [meta](/docs/authoring/variables.qmd#meta) | Print value from document metadata |
1920
| [env](/docs/authoring/variables.qmd#url) | Print system environment variable |

docs/authoring/version.qmd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Displaying Quarto CLI Version
3+
---
4+
5+
## Overview
6+
7+
The `version` shortcode prints the version of the Quarto CLI that is being used to build the document as part of the document content.
8+
9+
## Example
10+
11+
Here's an example of the `{{{< version >}}}` shortcode in action:
12+
13+
> Quarto CLI {{< version >}} is being used to build this document.
14+
15+
## Usage
16+
17+
::: {layout-ncol=2}
18+
```markdown
19+
Quarto CLI {{{< version >}}} is amazing.
20+
```
21+
:::: {.border}
22+
Quarto CLI {{< version >}} is amazing.
23+
::::
24+
:::

0 commit comments

Comments
 (0)