Skip to content

DOC-7128: retire the image shortcode - #4207

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7128-retire-image
Oct 5, 2026
Merged

andy-stark-redis merged 1 commit into
mainfrom
DOC-7128-retire-image

Conversation

@andy-stark-redis

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

Copy link
Copy Markdown
Contributor

Summary

Every image on the site is now Markdown, rendered by layouts/_default/_markup/render-image.html: 1,829 shortcodes converted across #4151 to #4206. No content file calls {{< image >}} any more, so this PR retires it. Final step of DOC-7128.

Removed:

  • layouts/shortcodes/image.html
  • The two process-markdown-content.html rules that rewrote image shortcodes for the AI Markdown/JSON feed. The Markdown-image rules stay.
  • Five embeds that nothing includes. content/embeds/ never renders pages of its own (build: render: never), so these were never rendered anywhere: account-role-table.html, create-db.md, rc-create-db-use-cases.md, rc-version-upgrade.md, and tls-configuration-procedure.md. I rechecked each one for references, with and without its extension, before deleting it.

Updated:

  • README.md's Images section now shows the Markdown forms: a plain image, an image with an attribute line, and an inline UI icon.
  • HUGO_DEPENDENCY_ASSESSMENT.md: its link to the deleted template now points at render-image.html.

Not changed, flagged:

Verification

  • Hugo really fails on a missing shortcode: on a throwaway site, a page calling {{< image >}} with no template stops the build with template for shortcode "image" not found, exit code 1. So a clean build here proves nothing still calls it.
  • Clean builds: under the production baseURL (/docs/latest/, confirmed in the output), the normal build (19,673 pages) and a drafts build (-D, 19,767 pages) both exit 0.
  • No rendered changes: against main, there are 0 image differences on any page. All 12,288 AI feed files (index.html.md and index.json) are identical, apart from 19 last_updated Git dates on the RedisVL pages DOC-7128: make the RedisVL sync emit Markdown images, and convert its 19 copies #4206 changed. That difference comes from how the baseline build was made, not from this PR.

🤖 Generated with Claude Code


Note

Low Risk
Documentation and dead-code removal only; prior migration verified zero rendered output changes and clean Hugo builds.

Overview
DOC-7128 cleanup: After migrating all docs to Markdown images, this PR removes the legacy {{< image >}} shortcode and related plumbing.

Removed: layouts/shortcodes/image.html; the AI/Markdown feed regexes in process-markdown-content.html that rewrote image shortcodes (Markdown image handling is unchanged); and five unreferenced content/embeds/ fragments that were never rendered.

Docs: README.md now describes Markdown images, Goldmark attribute lines for width, and inline #no-click icons via render-image.html. HUGO_DEPENDENCY_ASSESSMENT.md links to that hook instead of the deleted template.

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

With every image on the site converted to Markdown (#4151 through #4206), no
content file calls {{< image >}}, so the shortcode is deleted. Also removed:
- the two process-markdown-content.html rules that rewrote image shortcodes
  for the AI Markdown/JSON feed (the Markdown-image rules stay)
- five embeds that nothing includes and that never render, because
  content/embeds/ is build: render: never: account-role-table.html,
  create-db.md, rc-create-db-use-cases.md, rc-version-upgrade.md, and
  tls-configuration-procedure.md. They were rechecked for references, with and
  without the extension, before deletion.

README.md's Images section now shows the Markdown forms (plain, with an
attribute line, and inline icon), and HUGO_DEPENDENCY_ASSESSMENT.md's link to
the deleted template points at render-image.html.

A throwaway site confirmed that Hugo fails the build ("template for shortcode
"image" not found", exit 1) when a page calls a missing shortcode. So the
clean builds here, both normal and with drafts (-D), under the production
baseURL, show that nothing anywhere still calls it. Against main: 0 image
differences, and all 12,288 AI feed files are identical apart from 19
last_updated Git dates on the RedisVL pages #4206 changed. That difference
comes from the baseline build, not from this change.

Learned: Hugo fails the build on a call to a missing shortcode, but --quiet plus a pipe hides both the error and the exit code; check $? directly
Constraint: write images as Markdown; the image shortcode no longer exists, and any {{< image >}} call fails the build
Ticket: DOC-7128
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7128

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@andy-stark-redis
andy-stark-redis requested a review from a team October 5, 2026 12:10
@andy-stark-redis andy-stark-redis self-assigned this Oct 5, 2026

@dwdougherty dwdougherty 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.

LGTM.

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Thanks @dwdougherty !

@andy-stark-redis
andy-stark-redis merged commit 71d877f into main Oct 5, 2026
99 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7128-retire-image branch October 5, 2026 14:11
andy-stark-redis added a commit that referenced this pull request Oct 5, 2026
README conflict: both branches rewrote the Images subsection. Kept #4207's
merged Images text and this branch's new Links section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andy-stark-redis added a commit that referenced this pull request Oct 5, 2026
…s emit alert blockquotes (#4208)

Tidies up what the earlier render-hook rollouts left behind. Content now has
no note, warning, tip, info, alert, or expand shortcode uses, and the two
generators that would have brought callout shortcodes back emit alert
blockquotes instead.

Generators came first, because a hand conversion of generated pages is undone
on the next run. build/redisvl_docs_sync.py emitted callout shortcodes from
three admonition paths (MyST directives, sentinel-tagged rst admonitions, and
the first-paragraph sphinx fallback); all three now go through one helper,
_alert_blockquote(), which puts the `> ` marker after a list item's indent so
nested admonitions stay inside the item. build/generate_version_commands_page.py
was a second, easy-to-miss generator: DOC-7080 had converted the
redis-X-Y-commands.md pages it writes, but the script still emitted
{{< note >}}, so a regeneration would have reverted them.

A blockquote has no closing tag, so _end_alert_blockquotes() adds a blank line
where the old closing tag was the only separator: before plain text (which
would otherwise be a lazy continuation inside the callout) and before a second
alert header (which is a quoted line too, so it would join the first callout
as body text; reproduced from both the _SPHINX_BOX and sentinel paths, found
by Bugbot). It only tracks blockquotes that start with an alert header, and it
leaves following list items, headings, fences, and HTML alone, since those
start their own block and a blank line would loosen a list. It changes none of
the 1,212 current RedisVL files.

Content: 1,404 RedisVL callouts (308 files) were converted by importing the
sync script's own helper, so they're byte-identical to the next sync's output.
75 hand-authored callouts (47 files: iris, rs/references, radar, embeds, a few
develop/clients alerts) used a one-off converter that keeps indentation.
`alert title="Note"` became [!NOTE] and `alert title="Tip"` became [!TIP]; the
shortcode ignored its color attribute and every alert type renders the same.

Also removed: content/embeds/sample.md, an unreferenced demo of shortcodes in
embeds and the last caller of expand, plus the expand shortcode and its
partial. The .expand-content CSS and the copy-button wrapper logic in
layouts/partials/scripts.html stay, because scrollable-code still renders
expand-content. README's Hugo-specifics "Relative links" section now describes
/content/<path>.md Markdown links, matching AGENTS.md since #4181 (the Images
section is #4207's, kept when merging main).

Verified by building origin/main and this branch in the same working tree
under the production baseURL, so gitignored and untracked inputs matched:
7,287 pages each, 404 changed, and on every changed page the alert text, the
whole-page text, and the li/ol/ul/alert/heading/table/pre nesting skeleton are
identical. The only markup change is the body <p> that markdownify used to
strip, as in every earlier callout rollout. The .md feed now keeps the
`> [!NOTE]` marking where it previously flattened callouts to plain text.

Left alone, already broken on main: rack-zone-awareness (5 versions) renders a
literal [!NOTE] after a `-->` lazy continuation; develop/clients/sch.md and
go/scan-buffer.md each have an &nbsp; spacer absorbed into the callout above;
the commands pages for 6.2 to 8.4 carry a hand-added paragraph the generator
never emits.

Learned: a generated tree can have more than one generator; grep build/ for the shortcode before declaring a conversion durable
Learned: build/migrate_shortcode_links.py's callout stage writes `> ` at column 0, which pulls an indented callout out of its list item
Constraint: redisvl_docs_sync.py and generate_version_commands_page.py must emit alert blockquotes; reverting either brings shortcodes back on the next run
Constraint: _alert_blockquote() is the single source of RedisVL callout shape; the synced pages are byte-identical to its output
Constraint: a blockquote-ending rule must treat a following alert header as a new block, not as quoted continuation
Constraint: .expand-content CSS and JS are shared with scrollable-code; they aren't expand leftovers
Rejected: ending the guard on any `>` line | it would split `>>>` prompts in Python code blocks; track only blockquotes that open with an alert header
Ticket: DOC-7128
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EliShteinman added a commit to EliShteinman/docs that referenced this pull request Oct 5, 2026
Retires the image shortcode; conflict resolved to Redis's side while keeping every __DOCS_BASE_URL__ rewrite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EliShteinman added a commit to EliShteinman/docs that referenced this pull request Oct 5, 2026
Upstream redis#4207 deleted the image shortcode; BUILD.md and both Helm READMEs now list relref, /content/ links and /images/ Markdown images as the placeholder sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andy-stark-redis added a commit that referenced this pull request Oct 14, 2026
#4267)

#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>
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