Back to blog home

Going static

Posted on 24th September 2016

I have decided to move my PHP based blog to a purely static one. I didn't even use a static site generator. Why? Read on.

My PHP blog was a hacked together implementation anyway

The blog mostly consisted of using includes for convenience, but it did not even generate the index page with titles and dates, so I needed to add them in manually. The tiny gain in convenience did not outweight the fact that the server needed to generate the page every time, and it was not completely automatic: I still needed to update the index page manually.

Normal HTML is not that hard anyway

Sure, I could have opted for one of the many static site generators. However, the problem with this approach was that all my past articles would need to be either edited to suit the static site generator, or I would need to meticulously edit the configs to ensure old articles could stay as they are. The switch to a purely static HTML site was easy from PHP: I just ran the php command to generate all of the old articles, and new articles only need a bit of copy pasting.

Better build system support

By build system of choice, gulp, did not have plugins that were designed to be compatible with PHP code - they were only compatible with plain HTML. This meant that I could not minify my blog HTML, and I was restricted if I ever decided to use another plugin that needed plain HTML.

I don't need a fancy blog

As you may have noticed, I am not a very regular blogger, and I simply do not need any fancy features that many blogging platforms provide. This means that you need to evaluate which blogging appraoch is right for you - as a web developer, I'm fine with writing HTML, but many people may not be. However, for this blog, I believe that a static approach is best.