From cb71d5ddd4d8eea7fc44fb9d56b88e56ce8673a1 Mon Sep 17 00:00:00 2001 From: Roric van Schalkwijk Date: Wed, 14 Jan 2026 17:06:13 +0100 Subject: [PATCH 1/2] chore: small improvements --- docs/elasticsearch.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/elasticsearch.md b/docs/elasticsearch.md index afa9a0b..cfa5650 100644 --- a/docs/elasticsearch.md +++ b/docs/elasticsearch.md @@ -13,7 +13,7 @@ After scaffolding, follow these steps: Install the Yard Elasticsearch plugin and the Reactive Search npm package: ```shell -composer require plugin/yard-elasticsearch && pnpm install @yardinternet/reactive-search +composer require plugin/yard-elasticsearch wpackagist-plugin/elasticpress && pnpm install @yardinternet/reactive-search ``` ## 2. Add the Elasticsearch `.env` variables @@ -52,14 +52,12 @@ return [ Replace the current `@include('partials.header.search-bar')` of the search-bar with the following in the `header.blade.php`: -```diff -- @include('partials.header.search-bar') - -+ @if (is_plugin_active('yard-elasticsearch/yard-elasticsearch.php')) -+ @include('partials.header.reactive-search-bar') -+ @else -+ @include('partials.header.search-bar') -+ @endif +```blade +@if (is_plugin_active('yard-elasticsearch/yard-elasticsearch.php')) + @include('partials.header.reactive-search-bar') +@else + @include('partials.header.search-bar') +@endif ``` ## 6. Activate the Plugin & Configure Settings From 84abf9dba528e5f235726825d28c7fe980aa20ef Mon Sep 17 00:00:00 2001 From: Roric van Schalkwijk Date: Thu, 15 Jan 2026 16:20:06 +0100 Subject: [PATCH 2/2] fix: Elasticsearch hooks stub --- stubs/app/Hooks/Elasticsearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/app/Hooks/Elasticsearch.php b/stubs/app/Hooks/Elasticsearch.php index 970ff58..7fc8dea 100644 --- a/stubs/app/Hooks/Elasticsearch.php +++ b/stubs/app/Hooks/Elasticsearch.php @@ -10,7 +10,7 @@ use Yard\Hook\Filter; #[Plugin('yard-elasticsearch/yard-elasticsearch.php')] -class Elasticsearch +class Elasticsearch extends \Yard\Brave\Hooks\Elasticsearch { #[Action('wp_head')] public function enqueueAssets(): void