How to host webpages on github for free


GitHub is my favorite place to host my personal web apps. It is one of the finest places to host your web-based [ Python, Javascript, Django etc ] static websites.

Features I love

  • You can keep source code on the web
  • Discuss with others
  • Initially, you can host a static web page [can make static dynamic apps, with Python, we will discuss it later]
  • Make changes from your computer and commit and push changes to the repository you made, changes will go online

How to host a website on GitHub?

  • The first thing you need to do the GitHub software.Download and Install
  • Prepare your website on your PC
  • Create a repository with the following format on Github.com

username.github.io

  • The username and subdomain should match to host the website completely, otherwise the page not go live. You can try additional website by creating another Organization and then repository
  • Click the clone download the button on GitHub Pages

2018-02-18_122237

  • Open GitHub on the PC, File-Clone Repository
  1. Choose the Repository Folder first, say D:/Github [ where your source code will reside ]
  2. Paste the clone link and it will create a folder username.github.io
  3. Copy all of your web pages and folders to the new folder.

2018-02-18_115018

  • Now you need to made first commit to the master[only master branch commit will affects the website]
  • Finally Push all changes back the GitHub and your site will go online.

Check mine

 

 

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.