How to Create a Website on GitHub Pages: 12 Steps (with Pictures) (2024)

  • Categories
  • Computers and Electronics
  • Software
  • Programming

Download Article

Author Info

Last Updated: October 2, 2022

Download Article

  • Using a GitHub Desktop
  • |
  • Using GitHub Online
  • |
  • Tips

GitHub Pages is a great way to make your own personal site from scratch. It is completely free and only requires a GitHub account. Note, though, that GitHub Pages does not offer the most user-friendly design for making websites (unlike Wix or Squarespace), but it is a great way to gain experience with HTML/CSS/JS and all the elements of a website. This wikiHow will show you how to get started.[1][2]

Steps

Download Article

  1. 1

    Register an account on GitHub, if you do not have one yet. Before you can create your own website on GitHub pages, you need to create an account on GitHub. If you already have an account on GitHub, make sure to login. Both can be accessed from the upper right toolbar.

  2. 2

    Create a repository on GitHub. Make sure to name the repository "[your GitHub username here].github.io". This will initialize your GitHub website.

  3. Advertisem*nt

Method 1

Method 1 of 2:

Using a GitHub Desktop

Download Article

  1. 1

    Download GitHub desktop, if you do not have it already installed. Installing GitHub desktop is as simple as going to https://desktop.github.com/ and clicking on the big purple "Download" button. Then run the installer. This is needed in order to push changes to your repository.

  2. 2

    Install a code editor. You need one in order to get syntax highlighting on GitHub. Popular choices include Atom, Visual Studio Code, Sublime Text, and Notepad++, given their feature-rich and minimalistic feel. After installing a code editor, you are ready to get started.

  3. 3

    Create a file called "index.html". You can do so in your code editor or online. You can also go to your repository's location on your hard drive and create an "index.html" file in the repository's folder on your drive.

  4. 4

    Add your HTML. You will need to learn HTML in order to be able to code a basic webpage. It will also be useful for you to learn CSS and JavaScript so you can add styling and functionality to your webpage.

    • Remember to save the file.
  5. 5

    Commit the changes. Go back to GitHub desktop and click on the blue Commit to master button. Then click on Push Origin. This will upload the changes to GitHub.

    • If you plan to make more changes, you will want to pull the origin as well. Click on the Pull origin button in GitHub desktop to download the latest commit to your machine.
  6. 6

    View your webpage. Go to "[your GitHub username here].github.io" in a web browser. You may need to bypass your browser's cache by holding Ctrl or Command while clicking on the refresh button to view the new webpage.

  7. Advertisem*nt

Method 2

Method 2 of 2:

Using GitHub Online

Download Article

  1. 1

    Create a file called "index.html". Click on Add file then click on Create new file. This will open a file editor. Add "index.html" to the "Name your file" field.

  2. 2

    Add your HTML. You will need to learn HTML in order to be able to code a basic webpage. It will also be useful for you to learn CSS and JavaScript so you can add styling and functionality to your webpage.

    • Remember to save the file.
  3. 3

    Commit the changes. Click on the green Commit new file button to save the file to GitHub.

  4. 4

    View your webpage. Go to "[your GitHub username here].github.io" in a web browser. You may need to bypass your browser's cache by holding Ctrl or Command while clicking on the refresh button to view the new webpage.

  5. Advertisem*nt

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Tips

      • To add subpages, simply create a new folder on GitHub and add an "index.html" file into that folder.

        Thanks

        Helpful0Not Helpful0

      • If you register a domain name, you can have GitHub Pages use that domain name instead of the default.

        Thanks

        Helpful0Not Helpful0

      • GitHub pages repositories must be public, unless if you have a premium account.

        Thanks

        Helpful0Not Helpful0

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Submit

      Thanks for submitting a tip for review!

      Advertisem*nt

      You Might Also Like

      A Complete Guide to Making Your Own Website
      Carrd Tutorial: How to Make Your Own One-Page WebsiteHow to Make a Free Website Using Wix: Easy GuideHow toGet a Free Web SiteHow toMake a Website With Word

      Advertisem*nt

      About This Article

      wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 39,424 times.

      How helpful is this?

      Co-authors: 4

      Updated: October 2, 2022

      Views:39,424

      Categories: Programming | Making a Website

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 39,424 times.

      Is this article up to date?

      Advertisem*nt

      How to Create a Website on GitHub Pages: 12 Steps (with Pictures) (2024)

      References

      Top Articles
      Latest Posts
      Article information

      Author: Wyatt Volkman LLD

      Last Updated:

      Views: 5895

      Rating: 4.6 / 5 (46 voted)

      Reviews: 93% of readers found this page helpful

      Author information

      Name: Wyatt Volkman LLD

      Birthday: 1992-02-16

      Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

      Phone: +67618977178100

      Job: Manufacturing Director

      Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

      Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.