Skip to content

Commit

Permalink
Refactor to use RouteKey helper
Browse files Browse the repository at this point in the history
Now it uses the same code as the default parent outputPath helper but with a different extension
  • Loading branch information
caendesilva committed Dec 18, 2023
1 parent d86f543 commit a33a3f5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

use Hyde\Pages\InMemoryPage;
use Hyde\Pages\DocumentationPage;
use Hyde\Support\Models\RouteKey;
use Hyde\Framework\Actions\GeneratesDocumentationSearchIndex;

use function ltrim;

/**
* @internal This page is used to render the search index for the documentation.
*/
Expand Down Expand Up @@ -37,6 +36,6 @@ public static function outputPath(string $identifier): string

public static function routeKey(): string
{
return ltrim(DocumentationPage::outputDirectory().'/search.json', '/');
return RouteKey::fromPage(DocumentationPage::class, 'search').'.json';
}
}

0 comments on commit a33a3f5

Please sign in to comment.