Ad Code

How to host a static website on GitHub Pages for free.

 

3 minutes to read

There are many ways to host a static website for free. But In this article, we will describe how to host a static website on GitHub pages.

github.com

What is Github?

Github is a code host platform for Version Control and collabration which allow you and other work together on the same project from anywhere. it is free, you can work and collabrate unlimited repositories. 

Now we will discuss how to host a static website on GitHub pages. There are some steps to hosting a static website on GitHub.


  • Step 1: Open your browsers and search github.com.
  • Step 2: Open the Github website and sign up/sign in (if you have an account).

Sign in/Sign up

  • Step 3: Click on the New button (green button) to create a new repository.

Click On New Button
  • Step 4: Type the repository name as (reponame.github.io), make sure your repository is Public, and click on Create repository.

Create a new repository
  • Step 5: Your repository has been created, now upload your code file from your computer, Just click on uploading on existing file.

Uploading files
  • Step 6: Simply you can drag and drop the files or selects them from the file explorer.
  • Step 7: Click on Commit change.

Commit changes
  • Step 8: Click on Settings, then click on Pages.

Github Pages
  • Step 9: Go to the Branch section and select the main then Save.

Select Main Branch
  • Step 10: Refresh the page, you will see a link click on it to visit your website.

Your site is hosted
  • Step 11: Congratulations! Your website is hosted.

Here is a complete video:




You can see this blog also: How to connect Visual Code Studio to GitHub

Post a Comment

0 Comments

Ad Code