From e04b05444d92d2394b9fa5ba21047280bf18156a Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Wed, 11 Mar 2026 10:49:47 +0100 Subject: [PATCH] fix: use hidden data element for u-photo in hero h-card Some microformat parsers can't find u-photo when nested inside an tag. Move it to a hidden element at the top of the h-card section, matching the pattern used in h-card.njk. Also update CLAUDE.md docs for homepage/h-card changes. Co-Authored-By: Claude Sonnet 4.6 --- _includes/components/sections/hero.njk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_includes/components/sections/hero.njk b/_includes/components/sections/hero.njk index 262684a..4760b0c 100644 --- a/_includes/components/sections/hero.njk +++ b/_includes/components/sections/hero.njk @@ -14,6 +14,10 @@ {% set authorUrl = id.url if (id.url is defined and id.url) else (site.author.url or site.url) %}
+ {# Hidden u-photo for reliable microformat parsing (some parsers struggle with img inside links) #} + {% if authorAvatar %} + + {% endif %}
{# Avatar #} {% if heroConfig.showAvatar != false %} @@ -23,7 +27,7 @@ alt="{{ authorName }}" width="96" height="96" - class="u-photo w-24 h-24 sm:w-32 sm:h-32 rounded-full object-cover shadow-lg" + class="w-24 h-24 sm:w-32 sm:h-32 rounded-full object-cover shadow-lg" loading="eager" >