Skip to content

Commit

Permalink
Remove hacky route injection in favour of new search page implementation
Browse files Browse the repository at this point in the history
Targets the realtime compiler v4 as it's a breaking change that requires Hyde v2. See #1498
  • Loading branch information
caendesilva committed Dec 15, 2023
1 parent 37c2dde commit 38608b8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/realtime-compiler/src/Routing/PageRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Hyde\Pages\Concerns\BaseMarkdownPage;
use Hyde\Framework\Actions\StaticPageBuilder;
use Hyde\RealtimeCompiler\Http\LiveEditController;
use Hyde\Framework\Features\Documentation\DocumentationSearchPage;
use Hyde\Pages\Concerns\HydePage;
use Hyde\RealtimeCompiler\Concerns\InteractsWithLaravel;
use Hyde\RealtimeCompiler\Concerns\SendsErrorResponses;
Expand Down Expand Up @@ -90,13 +89,6 @@ public static function handle(Request $request): Response

protected function getPageFromRoute(): HydePage
{
/** @deprecated Can be removed by https://github.com/hydephp/develop/pull/1498 */
if (unslash($this->request->path) === DocumentationSearchPage::routeKey() && DocumentationSearchPage::enabled()) {
// Since this page is not present within the search index (as it's normally generated by a build task)
// we instantiate and return it here.
return new DocumentationSearchPage();
}

return Routes::getOrFail($this->normalizePath($this->request->path))->getPage();
}
}

0 comments on commit 38608b8

Please sign in to comment.