Closed bytesource closed 2 years ago
Hi @bytesource :wave: Sorry for the late response. So far, the static site generator does not yet support this as it always appends /index.html
to the generated file path. Technically it seems feasible to detect paths ending in a file name and using that one instead of index.html
. I will try this out once I have time this week and let you know when there's progress :)
Hi @jonathan-reisdorf,
That would be fantastic indeed. Thanks a lot for this project!
I've created a PR for this which should solve your issue. Hint: Using custom routes, your error page will not be moved to the new url, but copied, so it will be created in both places: 404.html
and error/index.html
. If you don't want this, you'd have to manually exclude the error page from the static site building, or use a custom page model that will change the error page's url instead of using custom routes.
Wow, thank you so much! Thanks to your plugin, now I truly have a static site that's blazing fast.
This is not a bug report, but a question about what custom routes can do.
For proper error handling, Cloudflare Pages, where I host my static files, looks for a file
404.html
in the root folder: https://developers.cloudflare.com/pages/platform/serving-pages/#not-found-behaviorHowever, after running
kirby3-static-site-generator
, the actual error page is located at/error/index.html
.Therefore, what I'd like to know is this: Using custom routes, is it possible to move
index.html
from/error
to the root, and renaming it to404.html
(/error/index.html
->/404.html
)?I tried the following, but it didn't work:
Any suggestions are highly welcome!
Cheers,
Stefan
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce
Context