1. Create github page
Create github repository with name in format USERNAME.github.com. In few minutes you will get email
that your github page is up and available at username.github.com.
2. Install and configure Jekyll
Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server.
$ gem install jekyll
Create basic jekyll directory structure
|-- _config.yml
|-- _includes
/-- _plugins
|-- _layouts
| |-- default.html
| `-- post.html
|-- _posts
| `-- 2012-11-24-my-first-post.markdown
|-- _site
`-- index.html
Create layout for your blog _layouts/default.html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{{ page.title }}</title>
</head>
<body>
{{ content }}
</body>
</html>
Create layout for post _layouts/post.html
<h1> <a href="{{ page.url }}" class="postTitle">{{ page.title }}</a> </h1>
{{ page.date | date: '%B %e, %Y' }}
{{ content }}
Create index.html
Blog homepage with posts list
<ul>
{% for post in site.posts %}
<li>
<span>{{ post.date | date: '%B %e, %Y' }}</span> <a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
3. Write your first post
Create new post and save it to _posts with filename in format YEAR-MONTH-DAY-title.MARKUP
eg. 2012-11-24-my-first-post.markdown
4. Run and deploy
USERNAME.github.com$ jekyll --server
will generate your blog and start Webrick server.
Now you can check your blog at localhost:4000. If everything is ok push it to your USERNAME.github.com repository and
your blog is deployed.