Skip to content

Commit c1ea7b2

Browse files
authored
Merge pull request #12006 from mcanouil/fix/issue11379
feat: native shortcode to get Quarto CLI version
2 parents 57b39fa + 3392920 commit c1ea7b2

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

news/changelog-1.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ All changes included in 1.7:
8080
- Fix `pandoc.mediabag` Lua typings so autocompletions work with the Lua LSP integration.
8181
- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in PowerPoint (`pptx`).
8282
- ([#11664](https://github.com/quarto-dev/quarto-cli/issues/11664)): `lipsum` shortcode is no longer randomly generated by default, use `{{< lipsum random=true >}}` to restore randomness.
83+
- ([#11379](https://github.com/quarto-dev/quarto-cli/issues/11379)): Add `version` shortcode to display the current Quarto version.
8384

8485
## Engines
8586

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
title: Version
2+
author: Posit, PBC
3+
organization: quarto
4+
contributes:
5+
shortcodes:
6+
- version.lua
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
['version'] = function(args, kwargs, meta)
3+
return table.concat(quarto.version, '.')
4+
end
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
format: html
3+
_quarto:
4+
tests:
5+
html:
6+
ensureFileRegexMatches:
7+
- ["Quarto [0-9]+\\.[0-9]+\\.[0-9]+ is amazing"]
8+
---
9+
10+
Quarto {{< version >}} is amazing.

0 commit comments

Comments
 (0)