Using Github Pages for Your Projects
Published: April 21, 2025
If you’ve ever built a simple project, portfolio, or web app and thought, “How do I put this online for free?” The answer might already be in your GitHub repo: GitHub Pages.
It’s GitHub’s built-in hosting for static websites. No config. No backend. No bill.
🚀 What You Can Host
- Portfolios and landing pages
- Docs for open-source projects
- Static web apps (like my rogue IP tool)
- Blog sites (like this one)
- HTML/CSS/JS playgrounds
🛠️ How It Works (In Simple Steps)
1. Push your project to GitHub
git initgit add ./*git commit -m "initial commit"git remote add origin https://github.com/yourusername/yourrepo.gitgit push -u origin main
2. Name your main file index.html
GitHub Pages looks for this as your homepage.
3. Go to repo settings → Pages
- Select source:
mainbranch - Choose
/docsor root folder - Click Save — and you’re live
Your link will look like:
https://yourusername.github.io/yourrepo/
🔥 Pro Tips
- Custom domain? Add a
CNAMEfile and update DNS - Use relative paths for images and styles (
./img/logo.png) - Test locally with:
python -m http.server 5500
🔄 Bonus: Updating is Instant
Every time you git push, your site is re-deployed. That means:
- Fix typos? Push
- Add new post? Push
- Ship new feature? Push
You’re always live.
✅ Real-World Use: How I Use It
I host:
- My personal portfolio
- Blogs like Terminal Commands and CEH Journey
- My JavaScript tools like the Rogue IP Identifier
All deployed straight from GitHub — no frameworks, no Netlify, no nonsense.
⚠️ Quick Drawbacks to Know
- Static only: No backend or databases supported
- No form support: You’ll need services like Formspree or Netlify Forms
- Public repos only: Free Pages only work on public repos
- No server logic: Can’t run Node, PHP, etc.
But for portfolios, tools, and docs — it’s honestly hard to beat.
🧠 Final Thoughts
GitHub Pages makes web deployment feel fun and instant. It forces you to write clean, static-friendly code. And it's the perfect companion for solo devs, learners, and OSS builders.
If you’ve got code — don’t let it rot in your editor. Put it on the web.