From 3ef2bde2531deb6573cb897cbcf43f8e9d431c91 Mon Sep 17 00:00:00 2001 From: ssavutu Date: Thu, 13 Aug 2026 15:58:14 -0400 Subject: [PATCH] Link a subsection's own children in the nav strip The CMS taxonomy is three levels now: A&E holds Food, and Food holds Beer Reviews, Wine Reviews, Restaurant Reviews and Cooking. A subsection page hardcoded an empty strip on the premise that a subsection had no children to show, so /food would have listed its articles with no way to reach the four categories beneath it. Both kinds of page read the same field, which the CMS now sets on subsection responses too. It is absent or empty for the leaf subsections -- still most of them -- and the strip then renders as nothing exactly as it did before. Co-Authored-By: Claude Opus 5 --- src/pages/[sectionSlug].astro | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/[sectionSlug].astro b/src/pages/[sectionSlug].astro index dc02fb1..cb5a08b 100644 --- a/src/pages/[sectionSlug].astro +++ b/src/pages/[sectionSlug].astro @@ -57,9 +57,12 @@ const sectionName = normalizeText( let hasMore = posts.pagination.has_more; -// The nav strip lists a section's subsections; a subsection page has none of -// its own to show. -const subsectionLinks: Subsection[] = isSubsectionPage ? [] : (posts.subsections ?? []); +// The nav strip lists whatever hangs directly under this page. A subsection can +// have children of its own now -- /food links Beer Reviews, Wine Reviews and +// Restaurant Reviews -- so both kinds of page read the same field. It is absent +// or empty for the leaf subsections, which is most of them, and the strip then +// renders as nothing exactly as it did before. +const subsectionLinks: Subsection[] = posts.subsections ?? []; ---