Building the Blog

1 min read

When I made the goal to build a blog and write in it actively I knew there were a few details I had to research like easiest to build, quickest page load, etc. I have some experience with Wordpress, but after playing with Middleman I decided to use it.

Middleman became the front-runner

I considered several blogging platforms including Wordpress, Ghost and Squarespace, but I ultimately ruled these out because of a few reasons:

  1. It was too much hassle to setup Wordpress and Ghost. Just too much overhead.
  2. Squarespace is nice, but I wanted to host this myself. Have control over every aspect of my blog.

Middleman allows me to develop in a language I love to work in (Ruby), not have to deal with a database (just easier being flat files), and allows me to write in an application like Byword and copy it over to my blog to publish.

I can also host my blog basically anywhere and make it lighting fast to load. If I want to keep my blog on Github, no problem. If I want it on my local server, no problem.

A few Middleman tips

I had never used Middleman before so when I was building the design of the blog (to match my personal website) I had to do some research on a few changes.

The first of these changes is having a layout for articles only. I could tell do this: /* => "article" but then I would have to start the home page and tell it to have a different layout. I found the below option in the config.rb file to handle making the articles have a separate layout:

1activate :blog do |blog|
2 blog.layout = "article"

I made the article layout be wrapped in the main layout file, which allowed me to have some "modularize" some components of the site to the main layout file, but leave some components for an article view.

If you want to display a "summary" of the article you can add Nokogiri to your Gemfile and make these options available in the config.rb file: do |blog|
2 blog.summary_separator = /(READMORE)/
3 blog.summary_length = 250
4 end

This also allows you to put "READMORE" into the article to flag the end of the summary for the article.

Currently I have not styled the tags or calendar pages of the blog, but after I do so, I'll make sure to update this article (and republish it) with any new helpful Middleman tips.