diff --git a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchIndex.php b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchIndex.php index c7b5ea94ec1..81f9ca514eb 100644 --- a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchIndex.php +++ b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchIndex.php @@ -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. */ @@ -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'; } }