Skip to content

add email-version hook to override detected Connect version - #14022

Merged
cderv merged 4 commits into
quarto-dev:mainfrom
juleswg23:feat-connect-version-override
Feb 13, 2026
Merged

add email-version hook to override detected Connect version#14022
cderv merged 4 commits into
quarto-dev:mainfrom
juleswg23:feat-connect-version-override

Conversation

@juleswg23

@juleswg23juleswg23 commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR makes embedding pre-releases of quarto into Connect (and vice versa) easier by allowing us to declare the version output Quarto should give, beyond the detected version. This makes it simpler to run Quarto on dev versions of Connect as we make staggered changes to Quarto email support, such as in #13882

closes#14021

---title: email with imageformat:
email:
email-version: 2---
Some of the content in this document makes its way to the rendered
HTML and some of it is destined for a custom email message. The
`email` block customizes the subject and the body of the email
message, while the rendered HTML contains only this paragraph.
::: {.email}
::: {.subject}
Buy groceries
:::
![](image.png)
:::

By setting the above fields, even if Quarto detects that it is running inside an old version of Connect, it will output V2 style email metadata.

When rendered locally, I see V2 output metadata, despite having an old version of connect.

pandoc to: html
output-file: email-with-image.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
variables: {}
metadata
document-css: false
link-citations: true
date-format: long
lang: en
title: email with image
email-version: 2
WARNING: Email format v2 is being forced via 'format.email.version: 2' in YAML. This overrides the Connect version detection.
Output created: email-with-image.html
image

Checklist

I have (if applicable):

  • filed a contributor agreement.
  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR

@posit-snyk-bot

posit-snyk-bot commented Feb 11, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

StatusScanner Critical High Medium LowTotal (0)
Open Source Security0000 0 issues
Licenses0000 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@juleswg23
juleswg23 marked this pull request as ready for review February 11, 2026 22:00
@cscheid

Copy link
Copy Markdown
Member

Looks good. Could you run quarto dev-call build-artifacts from your branch and push to this branch the changes you'll see in the schema directory?

@juleswg23

juleswg23 commented Feb 12, 2026

Copy link
Copy Markdown
ContributorAuthor

Thanks @cscheid. I did notice the build step, but wasn't sure if I was meant to run it locally. I pushed all the changes it generated, but none were in the schema directory. Will revert it if that's not what you were looking for.

edit: I must have committed the wrong files.

@cscheid

cscheid commented Feb 12, 2026

Copy link
Copy Markdown
Member

(sorry, I gave you the wrong paths. .../schema/... is where the schemas live, but those files are the ones that quarto-cli and the extension use to actually interpret and validate the YAML data)

This is strange. The error we're getting here seems (at least to me) to be unrelated. The files you've pushed are the ones I expected to see...

@cscheid

Copy link
Copy Markdown
Member

I think Christophe just added the necessary changes to main; I wonder if a merge would solve it.

@juleswg23
juleswg23force-pushed the feat-connect-version-override branch from 2ab92db to 94522b0CompareFebruary 12, 2026 20:23
@cscheid

Copy link
Copy Markdown
Member

🎉 If this is working for you within Connect, I'm fine with merging!

@juleswg23

Copy link
Copy Markdown
ContributorAuthor

Super, let's merge!

It's working locally (where I don't have connect v2026.03 since it doesn't exist yet), so I'm as confident as I can be for now.

@cderv

Copy link
Copy Markdown
Member

I think Christophe just added the necessary changes to main; I wonder if a merge would solve it.

Yes sorry. Windows / linux stuff againt

Regarding conflict, a rebase is needed on main (or merging main in the branch) and resolving conflict by building schema artifacts again.

Also, is a changelog entry needed maybe for this?

@cscheid

Copy link
Copy Markdown
Member

Also, is a changelog entry needed maybe for this?

Yes, that's good, and it is. Thank you.

@juleswg23
juleswg23force-pushed the feat-connect-version-override branch from 94522b0 to b238aa6CompareFebruary 13, 2026 17:48
@juleswg23

Copy link
Copy Markdown
ContributorAuthor

Merged and changelog entry added ✅

@cderv
cderv merged commit 76b9460 into quarto-dev:mainFeb 13, 2026
92 of 93 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

email: enable email-version field in header to override Connect version

4 participants

@juleswg23@posit-snyk-bot@cscheid@cderv