mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user