From dd77e6cd234c0adfdbe3e6dde58677eaa2eef516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20G=C3=B3mez-Arzola?= Date: Thu, 7 Mar 2019 09:37:37 -0500 Subject: [PATCH] Create JS library paths relative to HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a more resilient solution since it doesn’t rely on Pattern Lab being served from the theme directory. --- pl_attach-library.function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pl_attach-library.function.php b/pl_attach-library.function.php index 00ed98e..a6b9a57 100644 --- a/pl_attach-library.function.php +++ b/pl_attach-library.function.php @@ -25,7 +25,7 @@ foreach($files as $key => $file) { // By default prefix paths with a /, but remove this for external JS // as it would break URLs. - $path_prefix = '/'; + $path_prefix = '../../../../'; if (isset($file['type']) && $file['type'] === 'external') { $path_prefix = ''; }