I wrote a whole post about how my old Static Site Generator, Middleman, let me down, but as I was in the process of relaunching the site I found this old post in which I basically said the same things, back when the problems and pain were fresh. I like what I wrote back then, so I edited this post to remove any repeat content. I suggest you go back and reread that old post, then come here for some newer, additional thoughts.
Back? Okay. Here are a some other problems and complaints that I hadn’t previously covered:
This is not Middleman’s fault specifically, but I am now wary of the idea of using libraries such as SASS or LESS for styling the site. Basically, if you cannot look at a random sampling of CSS and have a basic idea what it will do (which I cannot), then you shouldn’t be adding a layer on top of that that adds even more features and functions that you will not understand.
Another problem is that using SASS in the site encouraged me to use libraries such as Bourbon, which I now see as a mistake. When you use Bourbon, you are downloading a bunch of pre-written SASS code that’s stored in a Ruby Gem. That means you have SASS being stored in a library format intended for storing Ruby code. It also means that some of the styling for your website lives outside of your site’s source repository, in whatever directory you store your system’s Ruby Gems. I like nothing about this setup. It makes the styling of your site extremely non-portable and difficult to access. How do you know what styles are being applied to your site? You either have to open up the files from each individual library, or look at the master CSS file generated by your SSG during its build process, which is not only no longer SASS, but may be hundreds or thousands of lines long? That’s just overkill for most simple websites.
When using Middleman I also fell into one of the habits I discussed in my last post – rather than write my content in pure Markdown, I wrote it in
.md.erb
files (meaning they were Ruby ERB template files that would get rendered into Markdown files which were then finally rendered as HTML). This allowed me to use Ruby code to create special directives that made it easier to add photos and photo captions. It also made the posts themselves non-portable, as any site generation tool that wasn’t written in Ruby would have no idea what to do with these directives. When I relaunched the site, I replaced all of these with standard HTML. This process was long and painful, but thankfully I won’t have to do it ever again. Going forward, I will hand write the image tags in any new posts, rather than come up with any sort of similar directives. It honestly doesn’t take that much more time to type out.Once again, I don’t believe I can blame Middleman for my use of ERB, but it certainly did not discourage its use either.
All things considered, Middleman is a tool that made itself irrelevant over time, and in a lot of ways it is the poster child for how the use of a Static Site Generator can go terribly wrong. I don’t regret my use of it, however, as it taught me a lot about what not to do, as well as for what to look for in any future alternatives.