fix: hide default hero when homepage builder is active (Tier 1)

The hardcoded hero section was always rendering, causing a double hero
when the homepage plugin is configured and has its own hero enabled.
Now only shows for Tier 2 (CV) and Tier 3 (default) fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-08 18:06:07 +01:00
parent bada61e2e4
commit b8c60b1a81
+8 -6
View File
@@ -3,7 +3,13 @@ layout: layouts/base.njk
withSidebar: true
---
{# Hero Section #}
{# Homepage content — three-tier fallback: #}
{# 1. Plugin config (homepageConfig) — homepage builder controls everything #}
{# 2. CV data — show experience/projects/skills with default hero #}
{# 3. Default — show recent posts and activity with default hero #}
{# Default hero — only shown for Tier 2 and Tier 3 (plugin controls its own hero) #}
{% if not (homepageConfig and homepageConfig.sections) %}
<section class="mb-8 sm:mb-12">
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
{# Avatar #}
@@ -59,11 +65,7 @@ withSidebar: true
</div>
</div>
</section>
{# Homepage content — three-tier fallback: #}
{# 1. Plugin config (homepageConfig) — Phase 3, future #}
{# 2. CV data — show experience/projects/skills #}
{# 3. Default — show recent posts and activity #}
{% endif %}
{% set hasCvData = (cv.experience and cv.experience.length) or
(cv.projects and cv.projects.length) or