From 78e098d4daaa0af2fecb4c2cd128601a73432081 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Mon, 18 May 2026 23:37:41 +0200 Subject: [PATCH] fix(static-assets): also cache-bust raw /static/ refs (fonts CSS, store JS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial codemod only converted url_for('*_static', path='*.js'|'*.css') patterns and missed 19 raw /static/... references — most importantly the shared/fonts/inter.css link in all four base.html files, plus a handful of + RIGHT: + - Images, fonts, and JSON locale files are intentionally out of scope — - keep using `url_for()` for those. + Images, fonts (other than .css), and JSON locale files are intentionally + out of scope — keep using `url_for()` for those. pattern: file_pattern: "app/**/templates/**/*.html" anti_patterns: - "url_for\\(\\s*['\"]\\w+_static['\"]\\s*,\\s*path=['\"][^'\"]+\\.(?:js|css)['\"]" + - "(?:src|href)=['\"]/static/[^'\"]+\\.(?:js|css)['\"]" exceptions: - "base.html" - "partials/" diff --git a/app/modules/billing/templates/billing/store/billing.html b/app/modules/billing/templates/billing/store/billing.html index 6760ba2d..3e1bca8b 100644 --- a/app/modules/billing/templates/billing/store/billing.html +++ b/app/modules/billing/templates/billing/store/billing.html @@ -405,5 +405,5 @@ {% endblock %} {% block extra_scripts %} - + {% endblock %} diff --git a/app/modules/customers/templates/customers/storefront/forgot-password.html b/app/modules/customers/templates/customers/storefront/forgot-password.html index 7856da98..b059351a 100644 --- a/app/modules/customers/templates/customers/storefront/forgot-password.html +++ b/app/modules/customers/templates/customers/storefront/forgot-password.html @@ -7,7 +7,7 @@ {{ _("auth.forgot_password") }} - {{ store.name }} - + {# CRITICAL: Inject theme CSS variables #} diff --git a/app/modules/customers/templates/customers/storefront/login.html b/app/modules/customers/templates/customers/storefront/login.html index ca7d7435..b927ba92 100644 --- a/app/modules/customers/templates/customers/storefront/login.html +++ b/app/modules/customers/templates/customers/storefront/login.html @@ -6,7 +6,7 @@ Customer Login - {{ store.name }} - + {# CRITICAL: Inject theme CSS variables #} diff --git a/app/modules/customers/templates/customers/storefront/register.html b/app/modules/customers/templates/customers/storefront/register.html index 47187e06..06caebab 100644 --- a/app/modules/customers/templates/customers/storefront/register.html +++ b/app/modules/customers/templates/customers/storefront/register.html @@ -7,7 +7,7 @@ Create Account - {{ store.name }} - + {# CRITICAL: Inject theme CSS variables #} diff --git a/app/modules/customers/templates/customers/storefront/reset-password.html b/app/modules/customers/templates/customers/storefront/reset-password.html index 8fac428a..15bab870 100644 --- a/app/modules/customers/templates/customers/storefront/reset-password.html +++ b/app/modules/customers/templates/customers/storefront/reset-password.html @@ -7,7 +7,7 @@ Reset Password - {{ store.name }} - + {# CRITICAL: Inject theme CSS variables #} diff --git a/app/modules/marketplace/templates/marketplace/store/letzshop.html b/app/modules/marketplace/templates/marketplace/store/letzshop.html index 90230849..e8eb6f62 100644 --- a/app/modules/marketplace/templates/marketplace/store/letzshop.html +++ b/app/modules/marketplace/templates/marketplace/store/letzshop.html @@ -9,7 +9,7 @@ {% block alpine_data %}storeLetzshop(){% endblock %} {% block extra_scripts %} - + {% endblock %} {% block content %} diff --git a/app/modules/marketplace/templates/marketplace/store/marketplace.html b/app/modules/marketplace/templates/marketplace/store/marketplace.html index b1258e98..31eb1239 100644 --- a/app/modules/marketplace/templates/marketplace/store/marketplace.html +++ b/app/modules/marketplace/templates/marketplace/store/marketplace.html @@ -11,7 +11,7 @@ {% block alpine_data %}storeMarketplace(){% endblock %} {% block extra_scripts %} - + {% endblock %} {% block content %} diff --git a/app/modules/marketplace/templates/marketplace/store/onboarding.html b/app/modules/marketplace/templates/marketplace/store/onboarding.html index d0efa7cc..49c445d4 100644 --- a/app/modules/marketplace/templates/marketplace/store/onboarding.html +++ b/app/modules/marketplace/templates/marketplace/store/onboarding.html @@ -6,7 +6,7 @@ Welcome to Orion - Setup Your Account - + diff --git a/app/modules/tenancy/templates/tenancy/merchant/login.html b/app/modules/tenancy/templates/tenancy/merchant/login.html index 7e3e974c..90b298df 100644 --- a/app/modules/tenancy/templates/tenancy/merchant/login.html +++ b/app/modules/tenancy/templates/tenancy/merchant/login.html @@ -7,7 +7,7 @@ Merchant Login - Orion - + diff --git a/app/modules/tenancy/templates/tenancy/store/invitation-accept.html b/app/modules/tenancy/templates/tenancy/store/invitation-accept.html index fb938a82..63a5ac73 100644 --- a/app/modules/tenancy/templates/tenancy/store/invitation-accept.html +++ b/app/modules/tenancy/templates/tenancy/store/invitation-accept.html @@ -6,7 +6,7 @@ Accept Invitation - {{ invitation.store_name if invitation else 'Store' }} - + {# Fonts: Local fallback + Google Fonts #} - + {# Tailwind CSS v4 (built locally via standalone CLI) #} diff --git a/app/templates/shared/macros/richtext.html b/app/templates/shared/macros/richtext.html index 4bbd3dae..99e1ab4b 100644 --- a/app/templates/shared/macros/richtext.html +++ b/app/templates/shared/macros/richtext.html @@ -35,7 +35,7 @@