mirror of
https://github.com/getgrav/grav.git
synced 2026-02-01 20:30:19 +01:00
Fix issue where page-based css and js were being downloaded rather than processed
This commit is contained in:
@@ -126,7 +126,12 @@ class Grav extends Container
|
||||
}
|
||||
Utils::download($medium->path(), false);
|
||||
} else {
|
||||
Utils::download($page->path() . DIRECTORY_SEPARATOR . $uri->basename(), true);
|
||||
$download = true;
|
||||
// little work-around to ensure .css and .js files are always sent inline not downloaded
|
||||
if (Utils::endsWith($uri->basename(), ['.css', '.js'])) {
|
||||
$download = false;
|
||||
}
|
||||
Utils::download($page->path() . DIRECTORY_SEPARATOR . $uri->basename(), $download);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user