diff --git a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php index d61a24b8105..f9d92c1556e 100644 --- a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php +++ b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php @@ -47,6 +47,11 @@ public static function enabled(): bool return Config::getBool('docs.create_search_page', true) && ! static::anotherSearchPageExists(); } + public static function routeKey(): string + { + return ltrim(DocumentationPage::outputDirectory().'/search'); + } + protected static function anotherSearchPageExists(): bool { // Since routes aren't discovered yet due to this page being added in the core extension, @@ -54,11 +59,6 @@ protected static function anotherSearchPageExists(): bool return Hyde::pages()->first(fn (HydePage $file): bool => $file->getRouteKey() === static::routeKey()) !== null; } - public static function routeKey(): string - { - return ltrim(DocumentationPage::outputDirectory().'/search'); - } - /** @experimental Fixes type issue {@see https://github.com/hydephp/develop/commit/37f7046251b8c0514b8d8ef821de4ef3d35bbac8#commitcomment-135026537} */ protected function makeDocument(): SemanticDocumentationArticle {