Trying Wintersmith

Posted on September 06, 2014

Wintersmith Logo

Last month, I decided to ditch WordPress and try out Wintersmith, a static site generator written in Node.

So, here’s some of my problems with WordPress

My problem with WordPress is that I don’t think I need what it offers. This blog (such as it is) isn’t complicated: It’s a way for me to share my thoughts on anything revolving around webdev with whoever will take the time to skim it.

I think that WordPress is offering too much for me. I don’t need a database, and I don’t need an application (written in PHP or whatever) to deliver this content. HTML written and stored as .html documents is just fine for me.

Enter Wintersmith

Hence, I’m going to try this static site generator for a bit. I played with other static site generators like the de facto Jekyll. But I suck at Ruby and I don’t know how Liquid works.

Wintersmith is in node so I can read and (sort of) understand the source. Installing was easy with npm (just npm install -g wintersmith then wintersmith new <path> and it’s up)

Markdown all the content

I mentioned earlier that HTML written in .html documents is just fine for me. What’s even better is Markdown compiled to html.

Some would think a drawback in not using a CMS is not having a WYSIWYG editor. However I’d like to make a rebuttal with this:

WYSIWYG is shit.

Unnecessary markup? Check. Bloated JS? Check (in most cases). Writers trying to use a WYSIWYG to design their posts (see tables). CHECK. With a bold. And Caps.

Sure, there’s usually a Source button where someone with reasonable skill can write custom HTML and CSS to make things a bit pretty.

But I’ve experienced WYSIWYG editors (like TinyMCE) completely destroying markup when the editor switches back from source mode to rich text mode.

So. Frustrating.

(I know I know, writers and content owners shouldn’t design their posts. But try telling them that. And then believe them when they say they’ll listen to you. And then die a little inside when they ask you to take a look at their post because things aren’t “lining up” properly).

Writing in Markdown is such a better experience than writing in HTML because it limits what a typical writer can do in terms of formatting their posts. Links, lists, bold, italic and images (kind of) are represented by minimal syntactic sugar.

But if you know HTML and need special mark up to match with some special CSS, then you can write straight HTML and CSS. Yay.

Jade Templates

At first, I didn’t understand the need for a templating language to abstract out HTML. Inject your template variables and just use HTML!

However I wanted to give this a try so I dove right in.

Immediately, I noticed how fewer keystrokes were needed (less keystrokes is a big deal, okay? A lazy developer is a good developer). Nesting elements makes sense and avoids the risk of not closing a tag properly.

Example of Jade

It’s clean and it’s pretty. I like it.

Okay so that’s it. I’ll be sticking to wintersmith for a while. Next, I think I’ll write about my build process. Automation is fun (when it works).