Today I threw together a static website in about an hour and had it hosted with a custom domain name in 20 minutes after that. This is a great recipe for getting something online quickly and looking decent too.

HTML Template

While I usually like to start new static sites from scratch with the HTML5 Boilerplate, having a completely blank slate can be daunting. Luckily there are many awesome folks on the internet who are willing to lend a hand and post free site templates. html5up.net is one such location, and it has lots of great templates to choose from. I selected the DopeTrope template as a starting point.

Once I had that template downloaded and set up on my computer, I modified it to have the content I wanted. I’m not going to go into detail here, but essentially I pulled out any parts of the template that I didn’t want and filled in the parts that I did want.

Code Storage

Once the site looked the way I wanted it to on my local machine, I uploaded it to GitHub. This involved creating a new repository and pushing the template code to that new repository.

One important note here is that the repository has to be public in order to take advantage of GitHub’s hosting option.

Here is the repository that I created: github.com/alexmarc-…

Static Hosting

With the static HTML site uploaded to a public GitHub repository, I was able to take advantage of GitHub Pages. pages.github.com has all the information. Basically, GitHub will give you a subdomain and free static site hosting so long as you use their service. It’s pretty amazing that this resource exists.

So, with a little bit of configuration in the creation of a new GitHub pages branch on the repository, the static site was deployed.

Here is the GitHub subdomain hosted site: alexmarc-us.github.io/crkellogg…

Custom Domain

In the GitHub pages configuration, you can even specify a custom domain name to point at the deployed page. This means your URL will look like a standalone site when it is actually being hosted on GitHub for free.

The settings for DNS here are a little confusing, but I found this stack overflow post really helpful.

Finally, here is the custom domain name pointed to that static hosted site: www.crkellogg.com