From b05eff3b30413022f33a9e9680a92361112e585b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 17 Aug 2026 16:25:09 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20i18n=20apostrophes=20in=20?= =?UTF-8?q?JS,=20schema=20author=20image,=20avatar=20crops?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JSON-encode i18n strings injected into appearance.js (#3040), resolve and publish the original author image for the JSON-LD schema (#3037), and anchor avatar crops to Center so small and zoomed framings match (#3016). Co-Authored-By: Claude Fable 5 --- assets/js/appearance.js | 4 ++-- layouts/partials/author.html | 8 ++++---- layouts/partials/home/background.html | 4 ++-- layouts/partials/home/hero.html | 4 ++-- layouts/partials/home/profile.html | 4 ++-- layouts/partials/schema.html | 14 +++++++++++++- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/assets/js/appearance.js b/assets/js/appearance.js index da3f8a9b..4e2082bc 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -55,8 +55,8 @@ window.addEventListener("DOMContentLoaded", (event) => { const switcherMobile = document.getElementById("appearance-switcher-mobile"); // Load the i18n translations for the tooltips - const darkLabel = '{{ i18n "footer.dark_appearance" }}'; - const lightLabel = '{{ i18n "footer.light_appearance" }}'; + const darkLabel = {{ i18n "footer.dark_appearance" | jsonify }}; + const lightLabel = {{ i18n "footer.light_appearance" | jsonify }}; updateMeta(); this.updateLogo?.(getTargetAppearance()); diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 995467e7..6f5683e9 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -11,9 +11,9 @@ {{ $final := $authorImage }} {{ $squareImage := $authorImage }} {{ if not (or $disableImageOptimization (eq $authorImage.MediaType.SubType "svg")) }} - {{ $final = $authorImage.Fill "192x192" }} + {{ $final = $authorImage.Fill "192x192 Center" }} {{ $shortSide := int (math.Min $authorImage.Width $authorImage.Height) }} - {{ $squareImage = $authorImage.Crop (printf "%dx%d" $shortSide $shortSide ) }} + {{ $squareImage = $authorImage.Crop (printf "%dx%d Center" $shortSide $shortSide ) }} {{ end }}