Beginner's Step By Step Guide of How to create a free GitHub Page or GitHub User Site and Why you should use it!

Beginner's Step By Step Guide of How to create a free GitHub Page or GitHub User Site and Why you should use it!


Hi All,

The main agenda of this post is how to create a free GitHub user page and project page for free.

In the world of Websites/Blog, it is very hard to establish something without investing some money in it. There are few ways you can create free websites or blogs like, 
  1. Google Blogger
  2. Wordpress
But if you go for these above mentioned CMS (Content Management System) sites and choose the free plan you'll get very less control over the website the create for you. I mean you can change almost everything but sometimes you'll find it difficult or stringent to make some customization as you want.

The main downsides of using these free systems I feel is:
  1. Less control over your site
  2. You'll get a Sub-domain for free for your site. Ex- site.blogger.com or site.wordpress.com

That is why today we will discuss another awesome free hosting site where you can eliminate one of those two downsides that is the control over your site. For free they will host any website you create and will give you a free sub-domain. You will get full control over your content.

Let's then start the discussion on how to get the GitHub user site up and running.

Step by Step Guide:


If you go to GitHub Pages you'll be able to see that there are mainly 2 types of sites or pages whatever you want to call it.
  1. User or Organization Site
  2. Project Site
In the above-mentioned page it is written:

You get one site per GitHub account and organization,
and unlimited project sites.

Ready? Let’s get started.


That means if you have a GitHub account you will be able to create one User website and Unlimited Project Sites.

How to Create a User or Organization Site:


Step 1: Create a repository


Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.

note: If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.

Step 2: Clone the repository (Using a Terminal)


Clone the repository

Go to the folder where you want to store your project, and clone the new repository using the below command.

~ $ git clone https://github.com/username/username.github.io

note: If you are using any other client please follow the steps mentioned in the above link page.

Step 3: Create an index file


Open any text editor and add an index.html file to your project: with the below HTML

<!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.</p>
</body>
</html>

Step 3: Commit & sync


Based upon what client you are using this step would differ. Assuming that you have basic git usage idea you just commit the changes and that is it.

Final Step: you're done!


Open your browser and go to -  http://username.github.io.


Going Further: What can be your next steps?


Now that your website is up and running what are the next steps you can take to take your website one step further? I will cover these next steps in some other post as this post was just how to create and further steps would require another post altogether.

1. Blogging with Jekyll: 


Using Jekyll, you can blog using beautiful Markdown syntax, and without having to deal with any databases.

2. Custom URLs:


Want to use your own custom domain for a GitHub Pages site? Just create a file named CNAME and include your URL.

3. Guides :


Learn how to create custom 404 pages, use sub-modules.

These above steps I will discuss on another post.

Please let me know if this helped you. And you have any questions or suggestions feel free to drop a comment.


Thanks,
Sarnendu Mukherjee.

Comments