From 0322ec899ea18261878a87d9b958057a625173eb Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Tue, 2 Dec 2025 15:14:15 +0100 Subject: [PATCH] fix(#123): shared layout not prepended when installing recipe --- app/Services/PluginImportService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Services/PluginImportService.php b/app/Services/PluginImportService.php index be69e3e..9207e3e 100644 --- a/app/Services/PluginImportService.php +++ b/app/Services/PluginImportService.php @@ -349,10 +349,13 @@ class PluginImportService } elseif ($filename === 'shared.liquid') { $sharedLiquidPath = $filepath; } + } - // If we found both required files, break the loop - if ($settingsYamlPath && $fullLiquidPath) { - break; + // Check if shared.liquid exists in the same directory as full.liquid + if ($settingsYamlPath && $fullLiquidPath && ! $sharedLiquidPath) { + $fullLiquidDir = dirname((string) $fullLiquidPath); + if (File::exists($fullLiquidDir.'/shared.liquid')) { + $sharedLiquidPath = $fullLiquidDir.'/shared.liquid'; } }