Good coding practice vs. short code?
This is a technical article, about how this site is internally built-in, if you're not interested about that and just want to use Void, read something else.
I know. We should never have content mixed with layout generation code inside PHP. We should separate into multiple PHP files rather than a single file. We should use templates. And patterns. And controllers. And a framework, instead of flat PHP. etc.
I know that. But the goal here is a bit different: to make the lightest code possible. The result is a single PHP file of less than 100 lines of code. Huh? Is it possible? Yes.
So, well, I haven't followed the usual practice mentioned before, and have focused on short code.
Why? Because when I open an existing code project made by someone else, I prefer reading a single 100-lines file, instead of the same thing split into 17 files, using a package-management-system-that-I-don't-have-and-that-I-have-to-install, using a nice-framework-that-will-make-life-easier for which I don't anything, and have to spend 3 hours to understand the basics.
Moreover, very often when you use a CMS and want to customize things, you'll have to change the template and the PHP anyway, so it does not really matter if the two are separated or not (like here) in such a simple project.