-
Notifications
You must be signed in to change notification settings - Fork 9
Asset folder not copied #23
Comments
Hi. A few questions:
By default the ASSETS table should look like this:
|
Hi :)
|
I can't reproduce on macOS or Windows. Is there anything special with your assets folder? A permissions issue maybe? |
I have tried it with mamp on MacOs and inside a vagrant VM with ubuntu. On my mac I set the folder permissions to 777. Strange. |
Maybe a lead: do you know how big that folder is? How many files it has. In particular, do you have I haven’t stress-tested that method to be honest. I’m using the Kirby Toolkit Folder::copy method, and I’m not sure it can handle a heavy load. If your HTML/JS code only consumes part of what is in c::set('staticbuilder.assets' => [
'assets/dist',
'assets/fonts',
'assets/images'
]; |
My assets folder has 42 files and a size of 2 MB. No node_modules and no .git. My content folder is bigger but even if I exclude it and only copy the assets folder it doesn't work. One test that didn't work was taking a subfolder 'assets/css' with three files in it. Is it possible that I need to install Kirby Toolkit or something? |
No, it’s a part of Kirby. Can you maybe zip that folder and upload it here, if it’s not too confidential? |
hey there, im involved in this. the /content/error folders are not being generated, removing them from the /content directory makes the asset copy work. It would be nice though if you would throw an exception for the folder copy with debug turned on. Error content/error/error.en.txt static/error/index.html Not generated |
I'm not sure it's the folder copy failing here. It looks like it's a page generation that fails and halts the script, which I can't recover from. The folder copy is supposed to happen next, but if page generation halted the script then it does not go to that point. Do you have more information on how the
I'm already displaying fatal errors, including Fatal Error: Uncaught expression, in: |
This makes sense! The error page I built was doing a redirect. This must have been stopped the generator.
In this case |
As documented in: https://github.com/fvsch/kirby-staticbuilder/blob/master/doc/static.md#http-redirections Note that you can exclude the error page if you don't use it and don't want to build it. Or maybe explicitly list the page types you want to build: c::set('staticbuilder.filter', function($page) {
// exclude pages that don't use one of the whitelisted templates
if (!in_array($page->intendedTemplate(), ['page', 'post', 'blog', 'home'])) {
return false;
}
// use the default logic for other pages (excludes empty folders, mostly)
return Kirby\StaticBuilder\Builder::defaultFilter($page);
}); |
Not sure if my config is wrong, but the assets folder is not copied to
/static/assets/
I am using Kirby 2.4. Here is my config:
What am I doing wrong?
I have also tried a config like the following without success:
The text was updated successfully, but these errors were encountered: