fix: restore sidebar on blog and post type pages

The homepage builder's sidebar bypass was using homepageConfig (a global
Eleventy data file) to suppress the sidebar on ALL pages, not just the
homepage. Now only bypasses when page.url == "/" so blog, post type, and
plugin pages keep their normal sidebar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-09 10:12:46 +01:00
parent 610f81f8fe
commit 523f538d1b

View File

@@ -270,7 +270,10 @@
</header>
<main class="container py-8" data-pagefind-body>
{% if withSidebar and not (homepageConfig and homepageConfig.sections) %}
{% if withSidebar and page.url == "/" and homepageConfig and homepageConfig.sections %}
{# Homepage: builder controls its own layout and sidebar #}
{{ content | safe }}
{% elif withSidebar %}
<div class="layout-with-sidebar">
<div class="main-content">
{{ content | safe }}
@@ -279,9 +282,6 @@
{% include "components/sidebar.njk" %}
</aside>
</div>
{% elif withSidebar and homepageConfig and homepageConfig.sections %}
{# Homepage builder controls its own layout and sidebar #}
{{ content | safe }}
{% elif withBlogSidebar %}
<div class="layout-with-sidebar">
<div class="main-content">