GitHub Pages How To Use: The Ultimate Beginner’s Guide

Logan Jul 13, 2026

Github Pages is a robust and user-friendly way to host and share static websites directly from your GitHub repositories. Whether you're a seasoned web developer or just starting out, setting up a Github Pages site is a straightforward process. Let's delve into the step-by-step guide to help you understand and create your own Github Pages minima site.

How to Host a Website for Free Using GitHub Pages
How to Host a Website for Free Using GitHub Pages

Before we dive into the how-to, it's crucial to understand that Github Pages is designed to serve static web pages and doesn't support server-side scripts. This means it's perfect for static site generators (SSGs), personal blogs, portfolio websites, and static HTML sites.

How to display an HTML page on GitHub
How to display an HTML page on GitHub

Setting Up Your Github Pages Site

Setting up a Github Pages site involves a few simple steps. We'll guide you through creating a basic minima site, a popular starting point for many.

GitHub Basics Tutorial - How to Use GitHub
GitHub Basics Tutorial - How to Use GitHub

First, you need to create a new repository named after your project. For this guide, let's call it "my-minima-site".

Initializing the Repository Locally

GitHub for Beginners 🧑‍💻 What You Must Know (2026 Guide)
GitHub for Beginners 🧑‍💻 What You Must Know (2026 Guide)

Start by initializing a new local Git repository and cloning it to your machine. Then, navigate to your project directory in your terminal.

You can initialize a new Git repository and clone it with the following commands:

git init
git remote add origin git@github.com:yourusername/my-minima-site.git
git pull origin main

Installing Dependencies and Creating the Site

Host a website in under 2 minutes (Github Pages)
Host a website in under 2 minutes (Github Pages)

With the repository cloned to your local machine, you can install the minima site's dependencies and create your new site. Let's use npm (Node Package Manager), as minima requires Node.js and npm.

Install Node.js from the official website if you haven't already. Then, install the necessary packages with:

npm install -g @sitepeed/minima

Once installed, create a new minima site with:

Git and GitHub Commands PDF - Complete Guide for Beginners to Pro🚀💻  #git #command #code
Git and GitHub Commands PDF - Complete Guide for Beginners to Pro🚀💻 #git #command #code

minima init

Customizing Your Site

Now that you've created a minima site, it's time to customize it to your liking. The site's layout and content are managed through the _config.yml and index.md files.

Complete Beginner’s Guide to Git and GitHub for 2025
Complete Beginner’s Guide to Git and GitHub for 2025
Engage with GitHub: Fueling Your Open Source Journey Forward 🌟
Engage with GitHub: Fueling Your Open Source Journey Forward 🌟
Git & GitHub Cheat Sheet 🔥 | Commands, Workflow, Branching & Version Control (Beginner to Pro)
Git & GitHub Cheat Sheet 🔥 | Commands, Workflow, Branching & Version Control (Beginner to Pro)
How to Clone a Repository Using GitHub Desktop
How to Clone a Repository Using GitHub Desktop
an info sheet with different types of logos and symbols on it, including the words'python project ideas '
an info sheet with different types of logos and symbols on it, including the words'python project ideas '
🚀 Git & GitHub Project Setup: A Complete Overview
🚀 Git & GitHub Project Setup: A Complete Overview
Github Profile
Github Profile
the github chat sheet is displayed in this screenshote screen graber
the github chat sheet is displayed in this screenshote screen graber
Git & GitHub Roadmap for Beginners
Git & GitHub Roadmap for Beginners
Join the Global GitHub Community: Powering Open Source Innovation 🌐
Join the Global GitHub Community: Powering Open Source Innovation 🌐
a laptop computer sitting on top of a desk next to a cup of coffee and pen
a laptop computer sitting on top of a desk next to a cup of coffee and pen
Push Code to GitHub Explained 🚀
Push Code to GitHub Explained 🚀
GITHUB CHEATSHEET
GITHUB CHEATSHEET
What is Git? (Day 1 Beginner Guide)
What is Git? (Day 1 Beginner Guide)
How to use GitHub | What is GitHub | Git and GitHub Tutorial | DevOps Training | Edureka
How to use GitHub | What is GitHub | Git and GitHub Tutorial | DevOps Training | Edureka
Custom Github Profile
Custom Github Profile
5️⃣ Use GitHub & Version Control Like a Pro 🐙💻
5️⃣ Use GitHub & Version Control Like a Pro 🐙💻
Why you can't use GitHub Pages for commercial use - and what to do instead
Why you can't use GitHub Pages for commercial use - and what to do instead
Host Your Website FREE on GitHub in 60 Seconds!
Host Your Website FREE on GitHub in 60 Seconds!
9 GitHub Commands Every Beginner Developer Should Know
9 GitHub Commands Every Beginner Developer Should Know

Configuring Site Settings

The _config.yml file is where you'll set your site's title, description, and other essential settings. For example, you can set your site's title like this:

title: My Minima Site

Customizing Your Homepage

The index.md file is your site's homepage. Here, you can add your introduction, blog posts, or any other content you'd like to display.

For instance, you can add a welcome message like this:

---
layout: default
---

# Welcome to My Minima Site!

This is my starter site created using Github Pages and minima.

After customizing your site, it's time to deploy it to GitHub.

Deploying Your Site to Github Pages

Once you've customized your site, you can deploy it to Github Pages with a single command. First, though, you need to create a new branch named "gh-pages" in your repository.

You can create the branch and switch to it with:

git checkout -b gh-pages

Deploying the Site

Now, deploy your site with the following command:

minima deploy --branch gh-pages

After the deployment is complete, your site will be live and publicly accessible at .

Remember to make subsequent updates to your site by editing the _config.yml and index.md files, committing your changes, and running the deploy command again. Keep exploring and customizing your site to make it truly yours!