mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 06:58:50 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user