Fix profile configuration for prerelease website#1932
Conversation
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-1932.quarto.org |
prerelease-subdomain is a site concern (which domain am I on?), not a phase concern (prerelease vs RC). Previously, the rc profile set it to empty and the prerelease profile set it to 'prerelease.', which caused the main site to link to prerelease.quarto.org during dev phase. Now the base _quarto.yml defines prerelease-subdomain as empty (links to quarto.org) and only _quarto-prerelease-docs.yml overrides it to 'prerelease.' for the prerelease site.
When CI set QUARTO_PROFILE=prerelease-docs, the profile group [rc, prerelease] auto-added rc (the group default), giving the prerelease site RC branding. Adding 'prerelease' explicitly (prerelease,prerelease-docs) satisfies the group so the default is not auto-added. This also makes the prerelease site immune to "flip to RC" commits that reorder the profile group, eliminating empty cherry-picks when those commits are auto-backported to the prerelease branch.
Explain the two-layer profile architecture (phase profiles vs site profile), what each _quarto-*.yml file does, the release lifecycle, and how to preview locally with different profiles.
|
I'll try to add in there what needs to be done for #1934 before merging |
Blog posts on main need to link to prerelease.quarto.org during RC phase (when docs only exist there) and switch to quarto.org after release. Unlike prerelease-subdomain (site identity), this variable is phase-aware: - Default: '' (links to quarto.org) - RC profile: 'prerelease.' (docs still on prerelease site) - prerelease-docs profile: 'prerelease.' (prerelease site links to itself)
663a185 to
09f596b
Compare
|
@cwickham I added This adds a phase-aware variable for linking to prerelease docs from content on Unlike
Usage in blog posts: During RC, this links to prerelease.quarto.org. After the release (when prerelease merges to main and the group flips back), it automatically switches to quarto.org — no manual edits needed. |
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-1932.quarto.org |
|
Successfully created backport PR for |
* Move prerelease-subdomain from phase profiles to base/site profiles prerelease-subdomain is a site concern (which domain am I on?), not a phase concern (prerelease vs RC). Previously, the rc profile set it to empty and the prerelease profile set it to 'prerelease.', which caused the main site to link to prerelease.quarto.org during dev phase. Now the base _quarto.yml defines prerelease-subdomain as empty (links to quarto.org) and only _quarto-prerelease-docs.yml overrides it to 'prerelease.' for the prerelease site. * Fix CI to explicitly activate prerelease profile for prerelease site When CI set QUARTO_PROFILE=prerelease-docs, the profile group [rc, prerelease] auto-added rc (the group default), giving the prerelease site RC branding. Adding 'prerelease' explicitly (prerelease,prerelease-docs) satisfies the group so the default is not auto-added. This also makes the prerelease site immune to "flip to RC" commits that reorder the profile group, eliminating empty cherry-picks when those commits are auto-backported to the prerelease branch. * Document profile system in README Explain the two-layer profile architecture (phase profiles vs site profile), what each _quarto-*.yml file does, the release lifecycle, and how to preview locally with different profiles. * Add prerelease-link-subdomain for phase-aware linking to prerelease docs Blog posts on main need to link to prerelease.quarto.org during RC phase (when docs only exist there) and switch to quarto.org after release. Unlike prerelease-subdomain (site identity), this variable is phase-aware: - Default: '' (links to quarto.org) - RC profile: 'prerelease.' (docs still on prerelease site) - prerelease-docs profile: 'prerelease.' (prerelease site links to itself) (cherry picked from commit 8516589)
* Move prerelease-subdomain from phase profiles to base/site profiles prerelease-subdomain is a site concern (which domain am I on?), not a phase concern (prerelease vs RC). Previously, the rc profile set it to empty and the prerelease profile set it to 'prerelease.', which caused the main site to link to prerelease.quarto.org during dev phase. Now the base _quarto.yml defines prerelease-subdomain as empty (links to quarto.org) and only _quarto-prerelease-docs.yml overrides it to 'prerelease.' for the prerelease site. * Fix CI to explicitly activate prerelease profile for prerelease site When CI set QUARTO_PROFILE=prerelease-docs, the profile group [rc, prerelease] auto-added rc (the group default), giving the prerelease site RC branding. Adding 'prerelease' explicitly (prerelease,prerelease-docs) satisfies the group so the default is not auto-added. This also makes the prerelease site immune to "flip to RC" commits that reorder the profile group, eliminating empty cherry-picks when those commits are auto-backported to the prerelease branch. * Document profile system in README Explain the two-layer profile architecture (phase profiles vs site profile), what each _quarto-*.yml file does, the release lifecycle, and how to preview locally with different profiles. * Add prerelease-link-subdomain for phase-aware linking to prerelease docs Blog posts on main need to link to prerelease.quarto.org during RC phase (when docs only exist there) and switch to quarto.org after release. Unlike prerelease-subdomain (site identity), this variable is phase-aware: - Default: '' (links to quarto.org) - RC profile: 'prerelease.' (docs still on prerelease site) - prerelease-docs profile: 'prerelease.' (prerelease site links to itself) (cherry picked from commit 8516589) Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
|
In fact, we may want release candidate to apply on prerelease website too... 🤔 I'll think about this more to adapt. Not that impacted. At least links are no more broken |
|
I'm also now realising this means next time we go to |
This I tried to prevent I think 🤔 |
|
I'm thinking of the links that use |
|
Oh I see, so for the blog post version INSIDE prerelease website? Because on quarto.org, after rc phase, it will use value inside But on prerelease.quarto.org, after rc phase it will be using I tried to cover different scenarios in tables above, but maybe I missed something. 🤔 |
|
Oh now I understand !! At next RC phase for quarto 1.10, then all the old blog post gets back a prerelease link !! Is that what you meant ? So maybe not a good idea at all, and we should keep it internal to docs or to some blog folder. But in that case, we would need a process or a script to remember We could also cleanup all Thanks for seeing this ! |
Follow-up to #1932. Now that prerelease-subdomain is defined in _quarto-prerelease-docs.yml rather than the phase profiles, the profile group order correctly controls which phase is active on the prerelease site. The explicit prerelease profile activation is no longer needed and prevents RC branding from showing on prerelease.quarto.org during RC phase.
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 quarto-dev#1932, relates to quarto-dev#1934.
…1938) Follow-up to #1932. Now that prerelease-subdomain is defined in _quarto-prerelease-docs.yml rather than the phase profiles, the profile group order correctly controls which phase is active on the prerelease site. The explicit prerelease profile activation is no longer needed and prevents RC branding from showing on prerelease.quarto.org during RC phase.
…1938) Follow-up to #1932. Now that prerelease-subdomain is defined in _quarto-prerelease-docs.yml rather than the phase profiles, the profile group order correctly controls which phase is active on the prerelease site. The explicit prerelease profile activation is no longer needed and prevents RC branding from showing on prerelease.quarto.org during RC phase. (cherry picked from commit a34fdb6)
…1938) Follow-up to #1932. Now that prerelease-subdomain is defined in _quarto-prerelease-docs.yml rather than the phase profiles, the profile group order correctly controls which phase is active on the prerelease site. The explicit prerelease profile activation is no longer needed and prevents RC branding from showing on prerelease.quarto.org during RC phase. (cherry picked from commit a34fdb6)
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.
* 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
* 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)
* 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)
The prerelease site (prerelease.quarto.org) gets wrong values from the profile system in two ways:
CI sets
QUARTO_PROFILE=prerelease-docs, but the profile group[rc, prerelease]auto-addsrc(the group default), giving the prerelease site RC branding instead of pre-release branding.prerelease-subdomainis defined in the phase profiles (_quarto-prerelease.yml/_quarto-rc.yml), but which subdomain to use is a site concern, not a phase concern. During dev phase, the main site incorrectly links toprerelease.quarto.org.Additionally, "flip to RC" commits that reorder the profile group get auto-backported to the prerelease branch via
port-to-prerelease.yml, causing empty cherry-picks.Fix
Separate
prerelease-subdomainfrom phase variables:_quarto.ymldefinesprerelease-subdomain: ''(links to quarto.org)_quarto-prerelease-docs.ymloverrides it toprerelease._quarto-prerelease.yml,_quarto-rc.yml) no longer set itFix CI to explicitly activate the
prereleaseprofile:QUARTO_PROFILEchanges fromprerelease-docstoprerelease,prerelease-docsrcis not auto-added