Skip to main content

Webpages with Github hosting

Website for you and your projects.
Hosted directly from your GitHub repository. Just edit, push, and your changes are live.
GitHub now can host your static projects to their servers, and that's for free. You just have to enable the GitHub pages for your repositories. You can forward GitHub's default URL to your custom domain/sub-domain. Let's see how we can do that.
Login to your GitHub account. create a new repository with name "(your GitHub username).github.io". This is your base GitHub page. add a sample index.html file to master branch and after commit, open a new tab on your browser and type: (your GitHub username).github.io 
Bingo!! you just hosted your first page on GitHub. (If it does not reflect the changes wait for some time, GitHub might be taking some time to publish it)
GitHub gives the option to use it's prebuilt theme to the pages. If you don't want to create a custom static site then go to settings of the repository. Scroll down to Github Pages, click on choose theme, then select an appropriate theme and edit necessary text. 
Now, if you want to host your another static project, create a repository, add files to it and go to settings, scroll down to GitHub Pages, and on the source select 'master branch'. Open new tab on browser and type : (your GitHub username).github.io/repository-name
If you own a domain and want to forward this github page site to your own domain/sub-domain, just open the (your GitHub username).github.io repository and add a CNAME file. Then write your domain/subdomain name.
Go to your domain registrar and add a CNAME entry for the domain/subdomain and add repository name in the value field. If you're using a subdomain, you have to first add a subdomain in DNS settings. Generally domain registrar takes 24 hours time to add CNAME to their system. You can see your project hosted on your domain after that. PS: for other projects, you have to just add '/repository-name' after your domain.
This is so much helpful for the Front-end developer to showcase their skills.

Comments

Popular among the Blog

Arrange Marriage = Online Shopping

Headless Browsing and UI testing Automation : A nightmare