From e3b022e2c5a7737edede88ca605fad153fb643ab Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 28 Sep 2025 15:14:16 -0400 Subject: [PATCH] Fix Jinja2 template syntax error - replace break with proper logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed template syntax error where {% break %} is not supported in Jinja2. Replaced with proper Jinja2 pattern using set variable and conditional check to find first available thumbnail for Open Graph images. Changes: - Use {%- set og_thumbnail = none %} and conditional assignment - Check og_thumbnail is none to ensure only first match is used - Maintains same functionality with valid Jinja2 syntax 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- make_post_sell/templates/content.j2 | 9 ++++++--- make_post_sell/templates/product.j2 | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/make_post_sell/templates/content.j2 b/make_post_sell/templates/content.j2 index e9153f1..f4acaee 100644 --- a/make_post_sell/templates/content.j2 +++ b/make_post_sell/templates/content.j2 @@ -7,12 +7,15 @@ + {%- set og_thumbnail = none %} {%- for thumbnail_key in ["thumbnail1", "thumbnail2", "thumbnail3", "thumbnail4"] %} - {%- if thumbnail_key in product.extensions %} - - {%- break %} + {%- if og_thumbnail is none and thumbnail_key in product.extensions %} + {%- set og_thumbnail = thumbnail_key %} {%- endif %} {%- endfor %} + {%- if og_thumbnail %} + + {%- endif %} {% if product.has_product_file and signed_get_object_url is not none %}