Skip to content

Commit

Permalink
Move up public method
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 18, 2023
1 parent ef0fa70 commit 883c09d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ 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,
// we need to check the page collection directly, instead of the route collection.
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
{
Expand Down

0 comments on commit 883c09d

Please sign in to comment.