Loading lessons...
GitHub Pages
GitHub Pages
GitHub Pages is a free service that turns a GitHub repository into a live website.
What can you publish?
- Personal or project websites.
- Static HTML, CSS, and JavaScript pages.
- Documentation for your projects.
How it works
You push your website files to a branch, and GitHub builds and hosts them at a public URL like:
https://username.github.io/repo-name/
Publish a site
- Push a project with an
index.htmlto GitHub. - Go to the repository Settings.
- Find Pages in the sidebar.
- Choose the branch to publish (often main).
- Save. GitHub gives you the site's URL.
The special repo name
If your repository is named exactly username.github.io, the site appears at https://username.github.io/ with no extra path.
A great learning tool
GitHub Pages is a perfect way to host a portfolio or practice project for free, no server needed.
TL;DR
- GitHub Pages hosts static websites from a repository.
- Publish from the repository Settings > Pages.
- Sites live at username.github.io URLs.
- Great for portfolios, docs, and practice projects.