Skip to content

Explain the syntax of the format: option in YAML (the '-' has meaning) #11498

Answered by mcanouil
fuhrmanator asked this question in Q&A
Discussion options

You must be logged in to vote

The format syntax is <extension-name>-<format> when to use it.

title: Lexdoc
author: J.J. Allaire
version: 1.0.0
quarto-required: ">=1.2.222"
contributes:
  formats:
+    html:
      toc: true
      theme: [yeti, custom.scss]

Where usually, the title is used in lowercase for the directory: _extensions/lexdoc/_extension.yml

Edit:

If I'm understanding correctly, it would be problematic to (re)name an extension tech-report (possibly) because the - has meaning to separate the extension name (directory) from the format.

- does not have "meaning".
The thing that as meaning is that the last word is supposed to be a format known to Quarto, so in your example you need tech-report-html as format …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mcanouil
Comment options

@fuhrmanator
Comment options

@mcanouil
Comment options

Answer selected by fuhrmanator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
extensions relates to Quarto extensions mechanism
2 participants