Skip to content

DOC-7186: reinstate the image shortcode temporarily for older open PRs - #4267

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7186-reinstate-image-shortcode
Oct 14, 2026
Merged

andy-stark-redis merged 1 commit into
mainfrom
DOC-7186-reinstate-image-shortcode

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings back the image shortcode, exactly as it was before #4207 retired it, so older open PRs that still use {{< image … >}} build again. Since #4207, those PRs fail with template for shortcode "image" not found until each one is converted, and that's been causing friction. We can retire the shortcode a second time once the older PRs have been dealt with. DOC-7186

Restored, byte-for-byte from just before #4207 (71d877f82^):

  • layouts/shortcodes/image.html
  • layouts/partials/process-markdown-content.html, which brings back the two rules that rewrite image shortcodes for the AI Markdown/JSON feed. Without them, a shortcode in an old PR would reach the feed as raw shortcode text. Nothing else has touched this file since DOC-7128: retire the image shortcode #4207.

Not reverted: the five embeds #4207 deleted (nothing used them), and the README's Images section, which keeps teaching Markdown. New content should still use Markdown images, as all of main already does.

Verification

  • I built under the production baseURL with a temporary page (not committed) using the shortcode forms older PRs contain: plain, widthed with a bare path and an unquoted width, an inline #no-click icon, and a screenshot inside a list step. The build passes, all four render the pre-DOC-7128: retire the image shortcode #4207 markup (<a sdata-lightbox> wrapper, width/class passed through, correct /docs/latest/ prefix), and the AI feed turns each into an absolute Markdown image.
  • main has no shortcode calls, so its own rendering doesn't change.

Before re-retiring: scan open PRs for {{< image, not just main, so this doesn't happen again.

🤖 Generated with Claude Code


Note

Low Risk
Temporary template and feed-rewrite restore for deprecated syntax; no change to current main content or auth/data paths.

Overview
Temporarily reinstates the Hugo image shortcode removed in #4207 so branches that still use {{< image filename="…" >}} build instead of failing with a missing template.

Adds back layouts/shortcodes/image.html (lightbox-linked <img> with optional width/align/alt/class). In process-markdown-content.html, restores AI/Markdown feed rewriting that turns image shortcodes—literal or HTML-escaped—into absolute ![…](https://redis.io/docs/latest/…) links, while keeping the existing Markdown-image cleanup and path absolutization (DOC-7128).

main behavior is unchanged (no shortcode usage); this is a compatibility bridge until older PRs are migrated to Markdown images.

Reviewed by Cursor Bugbot for commit cdff194. Bugbot is set up for automated code reviews on this repo. Configure here.

#4207 (DOC-7128) retired the image shortcode after every image on main had been
converted to Markdown. Older open PRs that still contain {{< image >}} calls
then failed the build ("template for shortcode "image" not found") until each
was converted, which is causing friction. This restores the shortcode exactly
as it was, so those PRs build again, until it can be retired a second time.

layouts/shortcodes/image.html and layouts/partials/process-markdown-content.html
are restored byte-for-byte to their pre-#4207 versions (71d877f^). The
partial's two image-shortcode rules have to come back as well, or a shortcode
in an old PR would reach the AI Markdown/JSON feed as raw shortcode text.
Nothing else from #4207 is reverted: the five deleted embeds were unused, and
the README keeps teaching Markdown images, which all new content should use.

Tested with a temporary page using the shortcode forms old PRs contain (plain,
widthed with a bare path and unquoted width, an inline #no-click icon, and a
screenshot in a list step), built under the production baseURL. The build
passes, all four render the pre-#4207 markup with the /docs/latest/ prefix,
and the feed turns each into an absolute Markdown image. main has no shortcode
calls, so its own rendering doesn't change.

Directive: before re-retiring the shortcode, scan open PRs for {{< image (not just main), or this happens again
Ticket: DOC-7186
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7186

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history (5 new this commit):

Memory updated at cdff194

@mich-elle-luna mich-elle-luna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thank you!

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Thanks @mich-elle-luna !

@andy-stark-redis
andy-stark-redis merged commit 73123a2 into main Oct 14, 2026
101 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7186-reinstate-image-shortcode branch October 14, 2026 15:36
EliShteinman added a commit to EliShteinman/docs that referenced this pull request Oct 15, 2026
Reinstate the image shortcode temporarily so older open PRs that still use it keep building.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EliShteinman added a commit to EliShteinman/docs that referenced this pull request Oct 15, 2026
… placeholder

Upstream redis#4267 brought back the image shortcode regexes with a hardcoded redis.io URL; restore the __DOCS_BASE_URL__ form they had before redis#4207.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants