DEV Community

Cover image for Hosting on Github
andysaktia
andysaktia

Posted on • Edited on

Hosting on Github

Here are the steps for creating free web hosting using github as the hosting site:

1. Create a new Repo

Create a repo by pressing the green New button, then name the repo according to your user account name, for example user-name.github.io. This is done so that the outside domain name will follow the base github hosting name.

Alt Text

2. Create file

The first file name that needs to be created is index.html with dummy html fields like <h1>Hello World</h1> to test the page later after the Repo is set as root (See step 3). The stages of creating a file are like clicking the Add file button > Create New file.

Alt Text

3. Enable Repo

The step is to go to settings > go to pages > source, use the dropdown menu to select the publishing source folder (usually default source reads None), by selecting root/master. When finished click Save.

Alt Text

The last step you can check on the address user-name.github.io. The index.html page should be readable.

====
Reference: configuring github pages site

Top comments (0)