From 182d0fd26e977c16f0f33ce2d358f2a2721d9e87 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:52:54 +0100 Subject: [PATCH] feat(listings): hide unlisted posts from blog and notes --- blog.njk | 8 ++++---- eleventy.config.js | 35 ++++++++++++++++++++++++++--------- notes.njk | 6 +++--- theme/blog.njk | 6 +++--- theme/eleventy.config.js | 35 ++++++++++++++++++++++++++--------- theme/notes.njk | 6 +++--- 6 files changed, 65 insertions(+), 31 deletions(-) diff --git a/blog.njk b/blog.njk index c05bbdd..e1b92b9 100644 --- a/blog.njk +++ b/blog.njk @@ -3,7 +3,7 @@ layout: layouts/base.njk title: Blog withSidebar: true pagination: - data: collections.posts + data: collections.listedPosts size: 20 alias: paginatedPosts permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}/{% endif %}" @@ -11,19 +11,19 @@ permalink: "blog/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber

Blog

- {% set sparklineSvg = collections.posts | postingFrequency %} + {% set sparklineSvg = collections.listedPosts | postingFrequency %} {% if sparklineSvg %}
{{ sparklineSvg | safe }}
{% endif %}

All posts including articles and notes. - ({{ collections.posts.length }} total) + ({{ collections.listedPosts.length }} total)

{% if paginatedPosts.length > 0 %}