Setup a jekyll site for your github account.

jekyll site github

May be you have heard about GuthubPages. If not, it is a quite easy way to create a website that is hosted at GitHub. And if you want you can make this website available under your own domain. Let’s get started:

First of all you need to create a GitHub repository with a name that will match your GitHub Pages website url. My github username is mseemann. So the name of the repository must be Every file that is present in this repository will be part of your website. Try it out and create a simple index.html in your repository, commit, push and access your website http://[username] Ok that works. But this is not perfect. You have to do a lot of things manually or generate your website with a separate content management system. A content management system that is a real timesaver for developers is jekyll. You can write your pages in markdown, you can work with templates and you may extend the capabilities of the cms with plugins. GitHub Pages supports jekyll out of the box.

To get started with jekyll you need to install jekyll by gem:

gem install jekyll

After that you need to run

jekyll new .

to create a scaffolded version of your website in the current folder. Want to see your new website? run

jekyll serve

and point your browser to http://localhost:4000. Any changes you now make in your sources will be regenerate your website immediately and is instantly available under http://localhost:4000.

Now you need to commit and push your new website in your gitHub repository and a few seconds later the content is available under http://[username]

To make the things perfect it would be nice to publish this website under your own domain. This is also possible. You need to create a CNAME file in your repository. This is a simple text file that must contain the domain name under which you want to access your website. After that you need to configure the DNS A record for your website. The ip addresses you need to use is documented here: DNS A-Record configuration. Thats it! Your website is now available under your own domain for free.