Further thoughts on static site generators, blogging, etc.

Andrew Smales
8 min readAug 24, 2015

--

Okay, so I wrote this post yesterday, and I assumed it would get maybe 4 people reading it. I didn’t tweet it out or anything, I just DM-ed it to my friend (whose tweet it was replying to), but I guess Medium shows it to people who are somehow connected to me, and it got way more views than I intended or expected.

Judging from comments I’ve received here and on Twitter, it seems like people are very interested in the idea of static site generators, so I want to elaborate on them a bit and also summarize some of the stuff I’ve heard after posting it.

I’m going to start by adding a few things to yesterday’s post, and then I’m going to describe what I think the ultimate blogging tool would be, which ties in with all of this.

PART ONE

So for the first “housekeeping” part: The most common comment was that you can host Jekyll blogs on Github Pages for free, which I knew but didn’t mention. I knew this was possible but I don’t know most of the details, and I’m not honestly that interested, I’d rather just throw the pages up on AWS for 0.03/month, or get a cheap VPS at somewhere reliable (I recommend Digital Ocean, Chunkhost and Linode and yes I threw in my referral ID since I have one, but I’m not shilling), but I would imagine Github Pages is good enough, especially if you’re familiar with git already (it has a learning curve for many people it seems).

A couple of people asked why I didn’t recommend Medium, since I wrote the post here. Honestly, I don’t have a strong opinion on Medium — it seems great in some ways, fine in other, and some parts confuse me. To me, it’s not the place to host a continuing blog, and the tweet I was writing about was specifically someone wanting to run a food blog.

Maybe I will remember what else goes in PART ONE later. Oh I guess if I knew I’d get some hits on that story I would have recommend you follow me on Twitter (I also prefer replying to people there) or read my other Medium articles (how do I link these? This is the stuff that confuses me about Medium! Here are the 2 biggest though: Here Is How Google Works, and Rise And Grind Taye Diggs.

Hey know what, I am going to add one thing to this section which might seem to clash with the whole point of me writing this article, but I’ll say this: In reality, listen, if you’re writing, and your whole point is to get a message across and to spread your ideas to people, I think you should do everything I say in this post, and set up your own blog, but also cross-post everything you write everywhere you can: Medium, Facebook, Linkedin, Twitter, a mailing list if you have it, wherever. Your blog can be the canonical place where your writing “lives”, but if your main goal is truly to communicate, do everything you can. Having said that, I will probably be too lazy to bother cross-posting this anywhere, even though that’s also my goal here.

PART TWO

Alright, so these are just some thoughts on static site generators and I guess there is going to be some blogging history in here. Honestly this whole post is already a mess, please don’t mistake it for me spending 2 hours writing a thinkpiece.

So static sites have some big advantages over the now traditional database-linked blogging platform site thing.

POINT 1: Static sites are fast. I have used a number of 3rd party Wordpress themes and plug-ins that hit the database so much it’s crazy, like every time a page loads, there are 50–100 database queries maybe. This is generally fine, it doesn’t make sites slow to a crawl, but it’s unnecessary, especially since most sites don’t really change much. Static site generators offload all this processing to your computer, which only does it once each time you change the site, and then you just upload the site to a server.

If you ever run your site through the Google PageSpeed checker, a pretty common thing is “Reduce server response time” and it’s one of the bigger causes of slow sites. There are various ways you can work on this, but having a static site means you will almost always have a pretty high score on this.

POINT 2: Sorry I am going through why static site generators are good and maybe I already went through all this in the last article, I forget.

POINT 3: I think it’s good to host your own blog on a web hosting account of some sort, and not a cloud-based blog platform that is tied into the tools. Some services are great, some are not, so I’m not saying this is a HUGE deal, but when you’re running everything yourself, you are able to switch providers easily and at will, and this is valuable.

POINT 4: Right now every static site generator I’ve seen runs on your computer, and each blog post, or site page, that you create exists in a plain text form on your computer. So if you have 10 blog entries, you have 10 plain text files on your computer in a certain folder that are essentially just the blog post, with a few lines of easy-to-read metadata at the top (like the title of the post, the date of the post, a permalink filename, etc).

The reason this is good is that you can back this folder up super, super easily. It’s not in some weird format that you have to parse, and you don’t have to run some unknown database query to output your entries, you have them all in the clearest, most basic format possible. If you ever DO want to switch to something other than the SSG you’re using, you can copy and paste them into the new software you’re using (if there isn’t a program to convert them). Your hosting company can disappear or burn down and you’ll still have a nice folder of text files of all your writing in a clear format, it’s so good. (And it goes without saying you should back up this folder all over the place constantly, I use Arq for this, it is the easiest thing in the world).

Maybe there are more good things, but yeah anyway, fast, static sites are really good for your readers, and clear, easy-to-backup files are really good for you.

PART THREE

So okay, this is just kind of a general talk about what, to me, the ultimate blogging tool would be, and obviously it’s going to be a static site generator:

Maybe the one failing that the current ones (at least the ones I’ve tried) have is they aren’t completely plug-and-play, they require a leeetle bit of work to get going. I think to really make them into a tool that anyone can use, this would be a good setup:

A desktop tool that was graphical, had a smooth user experience and guided you through the process a bit, and uploaded the files would be nice, but it doesn’t seem like anyone makes desktop apps much now, and it would be nice to be able to add entries from any device. So this would be interesting, but maybe not ideal.

For this reason, I think my ideal tool would be this:

  • It’s a website where you sign up, and when you log in, you have a folder structure that exactly imitates what a Jekyll folder would look like on your hard drive.
  • It’s not a CMS, it’s an interface showing a bunch of text files, which you can edit, rename, delete, etc.
  • To add a new entry, you click a “NEW FILE” button and it just creates a new text file. Other than maybe some boilerplate metadata at the top, it’s just a text file like you’d create on your computer.
  • When you are ready to publish, you click a button and it runs a Jekyll process on your folder, generates your static site, and uploads it to whatever hosting server you’ve entered info for.
  • Also, crucially, your whole Jekyll folder on this tool is synced to your Dropbox (and/or your Google Drive, etc), so you still have a copy of it on your computer, which you can work with as well.

So that’s my idea, just to have it set up to take some of the initial setup away, and also allow you to edit a Jekyll site from multiple devices (which is possible in other ways I guess, but not quite so easily as this imo).

So one funny thing I thought about after coming up with this is sort of related to the old days of blogging.

I started a blog-hosting site in I guess 1999, and it was a lot like any blog-hosting site today: You came, signed up, added posts and they were available on the web. Actually, it was also a static site generator, since the entries were all stored in a database, but a final step output everything to static files (to save money because servers cost a lot more back then).

Other people were working on sites like this and shortly after, Blogger was launched, and I was obviously very aware of it, and it seemed good, but the one really interesting thing about it, was that in its earliest incarnation, it didn’t host any pages — you had to have a web hosting account, and you input your username and password for that account into Blogger, and it would use them to push your site to your server.

I always this was very ingenious, because it was a very smooth, original way to let people to host their blogs on their own domains, but still use an actual blogging tool (instead of editing raw files or whipping up a homemade script). But the one thing that always got me about it was that I always just thought the idea of having people input their FTP username/password into a 3rd party site was insanely insecure and dangerous, and my basic thoughts about it were basically something like: “Wow, that’s a great idea, it’s clever and I wish I could also do it, but there’s no way in hell I’m storing people’s passwords on my server and then getting them all hacked one day!”

So the reason this is funny is just that in reality, the whole tool I described is somewhat like that whole idea. The tool I described wouldn’t actually store passwords, since there are many much, much better ways to give apps permission to use other apps these days, but it’s funny how when I was going through my whole idea of a stripped-down blogging tool that sends your files to a hosting server (or maybe the hosting server pulls them), I was like “Hey wait, this rings a bell!”

Anyway, I still make websites and apps all the time but I don’t really have the time to make this, unless a trillion people told me “oh man I’d pay for that!”, in which case someone else will probably do it before me (if that’s you and you’re some rich-ass startup, hire me!) But that’s my opinion on an app I’d like, since everyone seemed to be really interested in static site generators after my first post on the subject.

Give me feedback here or on Twitter or email me at andrew@smales.com and blah blah blah.

--

--

Andrew Smales

Hi. I’m @bn2b on Twitter. Please follow me for more.