Creating a Static Site With GitHub Pages

Written by med

GitHub Pages is a free web hosting service provided by GitHub that allows you to host static websites directly from your GitHub repositories. In this tutorial, I will walk you through the steps to create a static site with GitHub Pages.

Here are the steps:

  1. Create a GitHub account if you haven’t already. Go to and sign up for a new account.
  2. Create a new repository. Click on the “New repository” button on your GitHub dashboard. Give your repository a name and a brief description.
  3. Enable GitHub Pages. Once you have created your repository, go to the “Settings” tab and scroll down to the “GitHub Pages” section. Choose the branch you want to publish your site from (typically the “main” branch), and then click on the “Save” button.
  4. Choose a Jekyll theme (optional). GitHub Pages supports Jekyll, a static site generator, which allows you to easily add a theme to your site. You can choose a theme by going to the “Settings” tab, scrolling down to the “GitHub Pages” section, and clicking on the “Choose a theme” button. Once you have chosen a theme, GitHub will automatically create a new commit that adds the necessary files to your repository.
  5. Create your site’s content. Create a new file in your repository with the name “” or “index.html”. This file will be the main page of your site. You can add additional pages by creating new files in your repository.
  6. Push your changes to GitHub. Once you have created your site’s content, commit and push your changes to GitHub. GitHub Pages will automatically build and publish your site.
  7. Access your site. Your site will be available at It may take a few minutes for your site to be live.

That’s it! You have now created a static site with GitHub Pages. You can continue to add content and make changes to your site by committing and pushing changes to your repository.


About the author


Leave a Comment

(adsbygoogle = window.adsbygoogle || []).push({});