Add support for custom assets directory

Add handling for files starting with 'assets/' to serve from custom
directory similar to other static assets
This commit is contained in:
Ruben 2025-10-02 23:47:59 +02:00
parent 0a1bc74fa6
commit 1503e2c066

View file

@ -12,6 +12,8 @@ if (str_starts_with($file, 'styles/')) {
$filePath = $customBasePath . 'custom/' . $file; $filePath = $customBasePath . 'custom/' . $file;
} elseif (str_starts_with($file, 'fonts/')) { } elseif (str_starts_with($file, 'fonts/')) {
$filePath = $customBasePath . 'custom/' . $file; $filePath = $customBasePath . 'custom/' . $file;
} elseif (str_starts_with($file, 'assets/')) {
$filePath = $customBasePath . 'custom/' . $file;
} elseif (str_starts_with($file, 'default-styles/')) { } elseif (str_starts_with($file, 'default-styles/')) {
$filePath = $basePath . 'default/' . substr($file, 15); // Remove 'default-styles/' prefix $filePath = $basePath . 'default/' . substr($file, 15); // Remove 'default-styles/' prefix
} elseif (str_starts_with($file, 'docs-styles/')) { } elseif (str_starts_with($file, 'docs-styles/')) {