Skip to content

Replace pre-release feature includes with version-aware shortcode#1964

Merged
cderv merged 5 commits into
mainfrom
shortcode-callout-main
Mar 12, 2026
Merged

Replace pre-release feature includes with version-aware shortcode#1964
cderv merged 5 commits into
mainfrom
shortcode-callout-main

Conversation

@cderv
Copy link
Copy Markdown
Member

@cderv cderv commented Mar 12, 2026

Port of #1961 (targeting prerelease) to main.

Each release cycle requires manually editing per-version _pre-release-feature.qmd include files (and corresponding blog post includes) to toggle pre-release callouts on and off. This is error-prone and adds steps to the release checklist.

This replaces all _pre-release-feature.qmd and _quarto-X.Y-feature.qmd includes with a prerelease-callout shortcode that reads the site version from _quarto.yml and automatically determines whether to show a callout:

{{< prerelease-callout 1.5 >}}
{{< prerelease-callout 1.9 type="blog" >}}

The shortcode is added to the existing _extensions/prerelease/ extension (renamed from prerelease-docs-url/) alongside the existing prerelease-docs-url shortcode, sharing version-parsing helpers.

Changes

  • Consolidate _extensions/prerelease-docs-url/ into _extensions/prerelease/ with a single prerelease.lua containing both shortcodes
  • Replace all _pre-release-feature.qmd includes in docs and blog posts present on main
  • Delete 9 now-unused include files

Scope difference from #1961

Two files only exist on prerelease and are excluded here:

  • docs/extensions/engine.qmd
  • docs/publishing/posit-connect-cloud.qmd

These are already handled in #1961. When prerelease merges into main at release time, they'll arrive already using the shortcode.

cderv added 5 commits March 12, 2026 12:08
Rename _extensions/prerelease-docs-url/ to _extensions/prerelease/ and
combine both shortcodes into a single Lua file with shared helpers:

- prerelease-docs-url: existing shortcode for prerelease subdomain links
- prerelease-callout: new shortcode that shows version-aware callouts
  for feature docs (hidden after release) and blog posts (switches from
  pre-release to released text)
Migrate 5 include references across 3 files (all version 1.5, already
released) to use the new version-aware shortcode instead.
Migrate 5 blog posts to use {{< prerelease-callout X.Y type="blog" >}}
instead of including shared _quarto-X.Y-feature.qmd files.
These files are no longer needed now that the prerelease-callout
shortcode generates callout content dynamically based on version.
Documents both shortcodes (prerelease-docs-url and prerelease-callout),
usage examples, and version comparison logic with scenario table.
@github-actions github-actions Bot temporarily deployed to pull request March 12, 2026 11:43 Inactive
@cderv cderv merged commit d31a933 into main Mar 12, 2026
4 checks passed
@cderv cderv deleted the shortcode-callout-main branch March 12, 2026 11:43
@github-actions
Copy link
Copy Markdown
Contributor

Backport failed for prerelease, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin prerelease
git worktree add -d .worktree/sync-1964-to-prerelease origin/prerelease
cd .worktree/sync-1964-to-prerelease
git switch --create sync-1964-to-prerelease
git cherry-pick -x d31a933349d70ece292d5461b5cac513cc3d02cc

Sign up for free to 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.

1 participant