Ten reasons to use static sites
This is a little strange. Here I am writing a blog post about static sites, with my static site generator, but before I have actually transitioned my main blog to a static site generator! There’s commitment for you.
That said, I have been thinking quite a lot lately about static sites, somewhat inspired by Brent Roose’s excellent site which itself is statically hosted. In doing so, I am becoming increasingly convinced that it is the way to go for things like blogs, so let me tell you the reasons why:
- They are fast. I mean really fast. There are no databases to load and render, no fluff with admin panels and the files are already in a form ready for the internet.
- There’s nothing to hack. Something like WordPress or Drupal has accounts, passwords, roles - with static sites, that just isn’t the case. It’s just HTML, CSS and JS sitting in folders.
- Equally, there’s nothing to upgrade. Somewhat tied to the above point, with WordPress (as an example), you need to continually upgrade the software as well as the plugins. That takes time and is another attack-vector.
- They are cheap. With a static site, you just need something which can render HTML etc. No need for a MySQL database. No PHP. No particularly fast web server.
- It is easy to write blog posts. I find I am increasingly using Markdown for all of my documentation and that is exactly the form many static site generators render. With WordPress, I had to keep copy and pasting my text into Gutenberg which was frustrating and quite often discouraged me from using it.
- You can share and receive contributions from others. This aspect is fantastic in my opinion. I don’t have any direct experience of it (yet!), but I have contributed to many other people’s writing through GitHub/git using pull requests. As the articles are hosted publicly, it suddenly becomes possible. Imagine a similar situation with Drupal; I would have to receive feedback (possibly via email), then edit the post myself since I wouldn’t be handing out any logins, of course. With GitHub, that isn’t necessary.
- Internet not required. One huge bonus is that I can edit my posts in a text editor and see how they will be rendered using the in-built server. Imagine all those times when you were on a train with no WiFi or your home internet connection took a dive. With a typical CMS, I could see how my post would look by self-hosting it in a VM on my PC, but good luck deploying it live, afterwards; that would be much trickier.
- With GitHub or something similar, backups are baked in. I currently run a backup plugin with my WordPress installation which does a great job, but it’s another thing I need to worry about, store and check. As I use GitHub to host my Markdown files with full history, I just don’t need to give it another thought (
$cognitive_load -= 1;
). - I would find that switching is easier to another form of static site or CMS. Since all of my posts are in text format (and Markdown at that), I can gain access to the text and manipulate it into any form that I like. That’s not so easy with a standard CMS, even with plugins.
- You don’t have to give up features. Many static site generators come with themes, plugins and utilities which make your end-result much more sophisticated, but not at the expense as the big CMS plugins come with.
In summary, in my case, I do love WordPress, have used it for many live sites so far, and it does have a place, especially with unsophisticated users; but for some situations, I don’t think you can disagree with my points above. Or can you? Send me an email and let me know. Next time I will tell you which static site I settled on.
Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’ logicalmoon.com