Skip to content

Commit

Permalink
Update build search command to use new search page system
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 14, 2023
1 parent e6e0093 commit 158c6f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/framework/src/Console/Commands/BuildSearchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

namespace Hyde\Console\Commands;

use Hyde\Framework\Actions\PostBuildTasks\GenerateSearch;
use LaravelZero\Framework\Commands\Command;
use Hyde\Framework\Actions\StaticPageBuilder;
use Hyde\Framework\Actions\GeneratesDocumentationSearchIndex;
use Hyde\Framework\Features\Documentation\DocumentationSearchPage;

/**
* Run the build process for the documentation search index.
Expand All @@ -20,6 +22,12 @@ class BuildSearchCommand extends Command

public function handle(): int
{
return (new GenerateSearch())->run($this->output);
StaticPageBuilder::handle(GeneratesDocumentationSearchIndex::makePage());

if (DocumentationSearchPage::enabled()) {
DocumentationSearchPage::generate();
}

return Command::SUCCESS;
}
}

0 comments on commit 158c6f2

Please sign in to comment.