Skip to content

fix(cli): render experimental callout without markdownify round-trip#25217

Open
aheritier wants to merge 1 commit into
docker:mainfrom
aheritier:fix/cli-experimental-callout
Open

fix(cli): render experimental callout without markdownify round-trip#25217
aheritier wants to merge 1 commit into
docker:mainfrom
aheritier:fix/cli-experimental-callout

Conversation

@aheritier
Copy link
Copy Markdown

@aheritier aheritier commented May 30, 2026

Fixes #25215.

Summary

CLI reference pages with experimental: true or experimentalcli: true (e.g. docker pass) render an HTML fragment as a literal code block instead of the styled experimental notice:

</span>
<strong>Experimental</strong>

Root cause

layouts/cli.html produces the experimental notice by feeding a string containing the {{% experimental %}} shortcode through markdownify. The shortcode template embeds the icon partial. After the recent migration to multi-line Heroicons SVGs (commit ee71c80), the inner <path> line and the trailing </span> / <strong>Experimental</strong> lines end up at ≥4-space indent inside the expanded HTML — at which point markdownify re-parses them as a Markdown indented code block.

The Material Symbols icons in use before that migration were single-line SVGs, so the same template produced single-line indented HTML and the bug stayed dormant.

Fix

Replace the markdownify+shortcode round-trip with the rendered HTML inline, matching the styling of the experimental shortcode but with no Markdown re-parse. No new content, just template rendering.

Affected pages (27)

All pages where the data file sets experimental: true or experimentalcli: true: docker pass and subcommands, docker scout policy/environment/compare/stream/vex/attestation, docker checkpoint, docker manifest, docker buildx debug.

Verification

Built the site locally with docker compose up and confirmed the broken <pre><code></span>... block on /reference/cli/docker/pass/ is replaced by the proper styled callout with the beaker icon, Experimental heading, and explanatory paragraphs.

The Markdown export path (cli.markdown.md, used by View Markdown / Copy Markdown) was already correct and is untouched.

Screenshot 2026-05-30 at 19 23 22

The experimental notice on CLI reference pages was being produced by
running a Hugo shortcode through markdownify. The shortcode template
embeds the icon partial, and the recent migration to multi-line
Heroicons SVGs (commit ee71c80) pushed the inner SVG path to a
4-space indent inside the expanded HTML. markdownify then re-parsed
that HTML as Markdown and treated the indented lines (the SVG path
plus the trailing </span> and <strong>Experimental</strong>) as a
fenced code block, which is what users see on docs.docker.com.

Replace the markdownify+shortcode round-trip with the rendered HTML
inline, matching the styling of the experimental shortcode but with
no Markdown re-parse.

Fixes docker#25215
@netlify
Copy link
Copy Markdown

netlify Bot commented May 30, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 1d6fa02
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a1b1c0b22e2db00086b93b1
😎 Deploy Preview https://deploy-preview-25217--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the hugo Updates related to hugo label May 30, 2026
@docker-agent
Copy link
Copy Markdown

⏱️ PR Review Timed Out — The review agent hit the 1800 s time limit before completing. This usually happens on large or complex diffs. You can re-trigger with /review — if it times out again, consider splitting the PR into smaller pieces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hugo Updates related to hugo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Experimental CLI reference pages render shortcode tags as a code block

2 participants