Static Kirby website generator

Hi there,

I’ve spent the day making an extension that generates a full HTML version of a Kirby website:
https://github.com/noclat/kirby-gostatic

It is first meant to host Kirby websites on Github. I’ve tested it on a real website, and it works perfectly.

Feedbacks are welcome, and I’m curious to know about other usages than Github hosting.

12 Likes

Thanks for you work! Sounds good, is it based on the Statify Script?
Does it support multilang-sites?

I didn’t know the script, thanks for that. It’s really insightful, I must have some parts to rewrite getting inspired by Bastian’s statify code.

Mine supports multilang sites.

I think exporting static versions of Kirby powered sites is a great way to make them bullet proof. Excited to give this a try. Thanks for sharing it.

1 Like

I don’t know if anyone has tried this yet, but I just did and caused some very serious issues on my Mac.

This is a duplication of the Github issue I’ve just raised:


I don’t know why this is happening or if it’s got anything to do with with your code, but when I installed this locally on a Kirby site running through MAMP, and clicked save on the Site Options panel several things happened:

MAMP crashed
Several applications disappeared from my computer (MAMP, Chrome, Sublime Text, all of Adobe) etc.
Rebooting solved nothing
In short my computer is now very broken.

I can’t see anything malicious in your code but I thought it worth sharing my experience just in case there is something glaring wrong here.


Any thoughts would be very welcome.

Hi, first of all, I am very sorry this caused so much trouble in your computer. I can not identify accurately the cause of this, but I might have some thoughts:

  • I don’t declare cautiously variables, so sometimes, when error handling configuration differs from mine, Apache may crash.
  • Your routes might create conflicts (redirections, pages included in others or anything).
  • It ran out of scope, but I guess you didn’t set up a critical path intentionally… So I just don’t know how this could have happened. I tried it on two different websites and never had a problem.
  • To understand how files and folders could have been removed, I use a cleaning method to recursively erase outdated files then empty folders in the destination path. So maybe some special character or any other conflict is what has caused the recursive thing to run out of scope.

I have no idea about recovery options, if anyone could help here, it would be great.
Thanks for warning us, I’ve updated the readme of the project with an alert.

Thanks for your speedy reply and thoughts on what might have caused this.

I was running this on the initial Kirby install with no other modifications so I don’t think there was anything special about my site structure that might have caused this.

I actually tried it a few times and had the same result every time. Sadly the MAMP PHP logs were destroyed in the process so I can’t report anything from there.

When I removed the plugin and revisited the Site options panel and clicked save, everything worked fine again.

1 Like

Well, thanks for your feedback, I need to investigate this. Sorry again for what happened to your computer, I hope you haven’t lost any important data.
I recommend using Bastian’s script. It has less features, but works without danger.