Skip to content

Fix restricted shortcode rendering on unassociated machines page#25120

Merged
craig-osterhout merged 1 commit into
docker:mainfrom
gmondello:gregmondello/fix-restricted-shortcode
May 20, 2026
Merged

Fix restricted shortcode rendering on unassociated machines page#25120
craig-osterhout merged 1 commit into
docker:mainfrom
gmondello:gregmondello/fix-restricted-shortcode

Conversation

@gmondello
Copy link
Copy Markdown
Contributor

@gmondello gmondello commented May 20, 2026

Description

The restricted shortcode on the unassociated machines page renders with a visible </span> tag due to using {{% %}} (markdown) delimiters instead of {{< >}} (HTML) delimiters.

The {{% %}} delimiter causes Hugo to process the shortcode's HTML output through the markdown renderer, which escapes the HTML tags from the icon partial.

Fix

Switch from {{% restricted %}} to {{< restricted >}} delimiters.

This matches the pattern used by the similar experimental shortcode in other content files (e.g., layouts/cli.html).

Testing

Before (Prod) After (Preview)
image image

Switch from {{% %}} (markdown) to {{< >}} (HTML) delimiters for the
restricted shortcode. The markdown delimiter causes Hugo to process the
shortcode output through the markdown renderer, which escapes the HTML
tags and results in a visible </span> in the rendered page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 20, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit b5dae91
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a0dc22ade4c5400081b740a
😎 Deploy Preview https://deploy-preview-25120--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.

Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The change correctly fixes the Hugo shortcode delimiter issue. Switching from {{% restricted %}} to {{< restricted >}} prevents the markdown renderer from escaping the shortcode's HTML output (the <span> tags from the icon partial), which was causing a visible </span> tag to appear on the page. No content, front matter, links, or other documentation elements were modified. This is a clean, minimal, correct fix.

Copy link
Copy Markdown
Contributor

@craig-osterhout craig-osterhout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@craig-osterhout craig-osterhout merged commit 71a913d into docker:main May 20, 2026
16 checks passed
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.

3 participants