Free GitHub blog and hosting with Jekyll

Build username.github.io for free with a GitHub account


GitHub Icon

These days plenty of developers run a GitHub blog under their username. It's free, fast, and customizable. With Jekyll and a GitHub account, you can spin up your own domain and blog right now—no professional knowledge required.

Install Git Bash

Before installing, make sure you have a GitHub account, Ruby, Node.js, and Git Bash (I'm on Windows). You can download Git Bash here.

Git logo

Create a new repository

Create a new repository on your GitHub account, named after your username, like username.github.io. My GitHub username is spemer, so I created a repository like the one below.

Create a new repository

Clone into your local storage

Clone the repository into your local storage with Git Bash. The image below shows my example.

Setup & clone repository

Once you're inside your local directory in Git Bash, set up the repository in your local directory. After creating the repo on GitHub, you'll see a screen like this.

Setup & clone repository

Copy the HTTPS URL and paste it into Git Bash:

$ git clone https://github.com/spemer/spemer.github.io.git

Check directory

You can list the directory with ls.

Jekyll logo

Install Jekyll

Installing Jekyll into your local username.github.io directory is straightforward. Navigate into the directory and run:

$ gem install jekyll $ gem install jekyll bundler $ jekyll new {username.github.io} $ cd {username.github.io} ~/username.github.io $ bundle exec jekyll serve

User flow

If everything looks like the image above, you can preview your blog at http://localhost:4000/.

User flow

To stop the server, press Ctrl + C in Git Bash.

Initial commit

Now you can browse your GitHub blog. Publish it by committing and pushing files from your local directory to the GitHub repository:

$ git add . $ git commit -m "Your commit message" $ git push

Commit

Go to your GitHub repository and check your first commit.

GitHub repository

Check your domain

If your commit succeeded, visit your blog at username.github.io.

Customization

You can customize your GitHub blog with Markdown. Configure overall settings in _config.yml, and edit pages like about.md directly. Detailed docs are here, and you can browse cool themes at http://jekyllthemes.org/.

YAML config

Thanks for reading. To get in touch, visit my LinkedIn or email ghsspower@gmail.com.

Title : Free GitHub blog and hosting with Jekyll
Date : August 14, 2017
Writer : Hyouk Seo (Spemer)