From 4240177f24ce1f497a69be500e13d01d87d3a80d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 13 Dec 2023 17:06:34 +0100 Subject: [PATCH] Hide dynamic search pages from navigation --- packages/framework/src/Foundation/HydeCoreExtension.php | 2 +- .../Features/Documentation/DocumentationSearchPage.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/HydeCoreExtension.php b/packages/framework/src/Foundation/HydeCoreExtension.php index d5affa80188..84597646b77 100644 --- a/packages/framework/src/Foundation/HydeCoreExtension.php +++ b/packages/framework/src/Foundation/HydeCoreExtension.php @@ -36,7 +36,7 @@ public static function getPageClasses(): array public function discoverPages(PageCollection $collection): void { if (Features::hasDocumentationSearch()) { - $collection->addPage(tap(new InMemoryPage('search.json'), function (InMemoryPage $page): void { + $collection->addPage(tap(new InMemoryPage('search.json', ['navigation' => ['hidden' => true]]), function (InMemoryPage $page): void { $page->macro('compile', function (): string { return GeneratesDocumentationSearchIndex::generate(); }); diff --git a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php index 4563eb45337..d0050aa9142 100644 --- a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php +++ b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php @@ -36,6 +36,7 @@ public function __construct() { parent::__construct('search', [ 'title' => 'Search', + 'navigation' => ['hidden' => true] ]); }