Free Static Sites with Middleman and Github

Originally published at: http://www.sitepoint.com/free-static-sites-middleman-github/

I am going to teach you how to build a website using a new workflow that I have been using to build my own personal landing page, product page, and blog. Not only can you customise your site to fit your every whim and fancy, but I am going to show you how you can do it for free.

We are going to learn how to use Middleman to develop the site, and GitHub to host it. Let’s get started!

What is a Static Site?

A static site does not have any dynamic content. Great examples of static sites are blogs, landing pages and product pages. Since a static site comes “as-is”, it is extremely fast.

Meet Middleman, the Static Site Generator

Middleman bills itself as a “static site generator using all the shortcuts and tools in modern web development.” What exactly is a static site generator? It means that Middleman has scripts that take your source files (written in Markdown) and converts them into HTML. It also contains scripts that will deploy the generated HTML.

Setting Up Middleman and GitHub

Let’s hit the ground running. In this section, we will install Middleman, and learn how to deploy the newly generated site to GitHub. This section also assumes that you have a GitHub account. If not, you should create one.

Continue reading this article on SitePoint

Very interesting. I created an alternative way for building static web sites by using client side render of markdown files.

Benjamin, can you tell us why Middleman is better than other static site generators, such as Jekyll (the original, I think), or Octopus? I think there are more variants, but these two come to mind.

Interesting article. You seem to assume that every one has Ruby already installed as you start out with gem installs. You might want a paragraph on installing Ruby, Apache etc. I know that a lot of SitePoint users already know how to do this or have already done it. Maybe a link to “How to install Ruby and Apache” would be enough.

Thanks

Thanks! However, I think the article being on the SitePoint Ruby channel should be a given that Ruby is installed.

This article done by David Turnbull provides a great run down of other static site generators, and includes Middleman in it. I didn’t want to repeat it on this article.

@benjamintanweihao Thanks for the post- I found this helpful.

One possible clarification:

When you say: git push --set-upstream origin source, I receive an error.

I had to create the repo on GitHub first, and then add the remote before I could run this command.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.