From 70e617c6c69f27d87a4493a536a5366eb91f6ec2 Mon Sep 17 00:00:00 2001 From: Zeno Kapitein Date: Tue, 7 Oct 2025 15:10:59 +0300 Subject: [PATCH 1/4] Unify section display condition --- .changeset/afraid-mirrors-sleep.md | 5 +++++ packages/gitbook/src/components/Header/Header.tsx | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .changeset/afraid-mirrors-sleep.md diff --git a/.changeset/afraid-mirrors-sleep.md b/.changeset/afraid-mirrors-sleep.md new file mode 100644 index 0000000000..b55d2165c4 --- /dev/null +++ b/.changeset/afraid-mirrors-sleep.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Unify section display condition diff --git a/packages/gitbook/src/components/Header/Header.tsx b/packages/gitbook/src/components/Header/Header.tsx index 7b9bfbf6e9..51cdaf7568 100644 --- a/packages/gitbook/src/components/Header/Header.tsx +++ b/packages/gitbook/src/components/Header/Header.tsx @@ -23,6 +23,12 @@ export function Header(props: { const { context, withTopHeader, withVariants } = props; const { siteSpace, siteSpaces, sections, customization } = context; + const withSections = Boolean( + sections && + sections.list.length > 1 && + sections.list.some((s) => s.object === 'site-section-group') + ); + return (