GitHub Hosting – How to Use GitHub for Hosting a Small Static Website

githubhosting

I have found a project called impress.js on GitHub.

This project has a cool demo at http://impress.github.io/impress.js/.

How can I use GitHub in a similar way for my projects' demos (or at least for HTML-formatted online docs)?

Best Answer

They are called GitHub Pages. Here are the details on how to set it up.

  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.
    If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
  2. Clone the repository

  3. Hello World

    Enter the project folder and add an index.html file: