[Sync to prerelease] Replace prerelease-link-subdomain with version-aware shortcode#1943
Merged
cderv merged 1 commit intoprereleasefrom Mar 6, 2026
Merged
[Sync to prerelease] Replace prerelease-link-subdomain with version-aware shortcode#1943cderv merged 1 commit intoprereleasefrom
cderv merged 1 commit intoprereleasefrom
Conversation
* Replace prerelease-link-subdomain with version-aware shortcode The `prerelease-link-subdomain` variable is phase-aware but not version-aware — on the next RC cycle, old blog posts would incorrectly point to prerelease.quarto.org even though those docs already moved to quarto.org. Add a `prerelease-docs-url` shortcode extension that compares a version argument against the `version` key in `_quarto.yml` to decide whether docs live on quarto.org or prerelease.quarto.org. On the prerelease site (prerelease-docs profile), it always returns "prerelease." regardless of version. Follow-up to #1932, relates to #1934. * Update PDF accessibility blog post to use prerelease-docs-url shortcode (cherry picked from commit 63a21f0)
Collaborator
|
/deploy-preview |
Contributor
Author
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-1943.quarto.org 🔄 Modified Documents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sync of #1939 to
prerelease.Original PR
Replace prerelease-link-subdomain with version-aware shortcode
prerelease-link-subdomainis phase-aware but not version-aware. On the next RC cycle (e.g. v1.10), old blog posts about v1.9 features would incorrectly flip back toprerelease.quarto.orgeven though those docs already moved to quarto.org.Fix
Replace the variable with a
prerelease-docs-urlshortcode extension that takes a version argument:The shortcode uses two rules:
prerelease-docsprofile active): always returnprerelease.versionkey in_quarto.ymlusingpandoc.types.Version. Ifarg <= version, docs are on quarto.org (return""). Ifarg > version, docs are still only on prerelease (returnprerelease.).A new
versionkey in_quarto.ymltracks the current stable release ('1.8'on main today). The_quarto-prerelease-docs.ymloverrides it to'1.9'but the shortcode never reaches the comparison on the prerelease site (rule 1 short-circuits). The version drops thevprefix for clean comparison; the announcement banner adds it back inline.Lifecycle of a blog post
A blog post on
mainannounces a v1.9 feature using{{< prerelease-docs-url 1.9 >}}. The blog post itself never changes — the links flip automatically as releases happen:On quarto.org (version comparison):
versionin_quarto.ymlOn prerelease.quarto.org (
prerelease-docsprofile short-circuits):All links always go to prerelease.quarto.org regardless of version, since the prerelease site hosts its own copy of the docs.
Testing
Verified each lifecycle row by rendering a test blog post and checking output links. For rows requiring a specific
versionvalue,_quarto.ymlwas temporarily edited.versionquarto render <post>quarto render <post> --profile rcquarto render <post>quarto render <post> --profile prereleasequarto render <post> --profile "prerelease,prerelease-docs"Both quoted (
"1.9") and unquoted (1.9) argument forms work correctly.Follow-up to #1932, relates to #1934 and #1938.