What is GitHub Pages?
A beginner-friendly guide to a free static web hosting for education!
As part of the GitHub Pages 101 series here's the first article that describes the what and why of the GitHub Pages.
GitHub Pages is a web hosting service offered by GitHub, which allows you to host your websites on a github.io subdomain. The coolest thing about this service is that it integrates directly with your codebase, ie. your code's repository, so deploying a site on GitHub Pages means simply pushing your files onto your GitHub Repository, and the GitHub Pages system then takes your bunch of files, optionally passes them through a build sequence and then deploys it to the github.io subdomain assigned to your repo.
The last words might have sounded complex too, and that somehow contradicts the intent of this series, which is to remove complexity. So we'll dive deeper into the details in a while. Before that, here are a few things to remember about Pages.
Now that our requirements are well laid out, let's dive deeper into how Pages works.
To understand why those specific use cases have been set, we need to analyze how Pages works internally. Before we go into the deployment process, important things to be noted are
If I had a repo by the name krharsh17/test, given that krharsh17 is my GitHub username, and if I were to use this repo with GitHub Pages, I would need to create an index.html in the '/' directory of the repo, or the root of the repo. Then, my website, once deployed, would be accessible on the URL: https://krharsh17.github.io/test

The deployment of a website on Pages happens in the following way:
Pages collects all of the files stored in your repository, including all files that are HTML/CSS/JS and all files that are not HTML/CSS/JS. This is why no confidential files should be stored on the repository
This step is optional, depending on whether you opt for it or not. What happens here exactly is that your code is run through a static site generator, to build the website directly from markup/text files. GitHub Pages uses Jekyll as its static site generator by default, and to avoid it from being used on a repo not intended to be used with it, a .nojekyll file has to be present in the repo.
Once the static site generation has been taken care of, the generated/original files from the repository are then deployed onto the domain relevant to the repository. Now you can access your index.html file on the github.io URL provided to your repo, and this file will be able to link to and access all files that are present in the repo by proper relative addressing. We'll dive deeper into how domains are allotted to repos in a later section.
So by this explanation, it should be obvious by now that Pages is a static web hosting provider, meaning that no server-side code can be run on it. Even the multipurpose .htaccess file is not supported by Pages. However, most project/personal websites do not require server-side coding, so for the average user, Pages is still quite useful.
Now that we've looked at the functionality behind Pages, let's have a look at its usage caps
These figures ensure the best performance for small scale personal or project websites and are sufficient enough for any beginner who wants to be free of any server-side coding and still be able to try out his frontend in a production environment.
So in a nutshell, GitHub Pages is the perfect backend for your static websites which are meant for personal or small-scale professional use. It is not meant to be used for commercial purposes, and it does not allow any server-side coding, meaning that it is meant to just serve your static HTML files on the web as they normally are served when you open them locally in a browser. This, however, holds a lot of possibilities, as many frameworks which create static builds can be used to deploy responsive PWAs quickly, and documentation for literally any entity can be generated from markdown files instantly with appropriate theming.