Host your website using GitHub pages

You can host your website without purchasing a domain name. This is possible using GitHub pages. For this, just create a new repository with your username.github.io and run .html file using this URL. Follow following steps to host your  website using GitHub pages.

Step 1

  1. create github.io repository to host your website. Without this, hosting is not possibleScreenshot from 2016-05-23 21:35:08

Type your username not me 😛

2. Now add demo.html file to check whether your https://manpreet9112.github.io/ link is working or not.

https://manpreet9112.github.io/demo.html

3. If working then Done.

Step 2

Now host website using domain that you have created https://manpreet9112.github.io/     

Firstly create another branch (gh-pages) of your existing repository which you want to host

  1. open desire repository, for example,  JavascriptGraphs
  2. Goto settings.
  3. click on Launch automatic page generator.
  4. click on continue to layout.
  5. Select the theme of your website.
  6. Now branch name gh-pages is created this will contain all files of your master branch.

      Screenshot from 2016-05-23 21:57:337. Now see your site using  https://manpreet9112.github.io/JavascriptGraphs/curvedemo.html

OR    

Another way to host website via terminal.

Add new branch to existing repository

git checkout gh-pages

push changes to github

git add -Agit commit -m "Adding pages

Now see your site using  https://manpreet9112.github.io/JavascriptGraphs/curvedemo.html

enjoy 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s