DEV Community

Cover image for How To Host Your Website For Free on Github Pages

How To Host Your Website For Free on Github Pages

Tia Eastwood on May 29, 2020

So you've created your cool new website in your code editor, yay! Perhaps it's your portfolio website that you want potential employers to see...pe...
Collapse
 
mrrcollins profile image
Ryan Collins

This is an awesome feature, I'm surprised more don't take advantage of it. I run a little geek/retro site on it with a static website generator (Pelican). You have to be willing to keep the repo public, but that's usually not a big deal.

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him)

You can keep it private too

Collapse
 
mrrcollins profile image
Ryan Collins

Good to know!

I've always kept it public in case someone wants to contribute... No one ever has, lol!

Collapse
 
sl4rtyb4rtf4st profile image
Andrew Millar • Edited

โค
If you are slightly lazy (like me) you can use github desktop. I init the repo using the terminal then use desktop to publish the repo to github and do the committing/pulling through the terminal. That way you don't have to set up the remote or log into github though the terminal. Because github desktop doesn't have git stash or git commit --amend๐Ÿ˜ฏ. And the terminal is just faster.

Collapse
 
tiaeastwood profile image
Tia Eastwood

Interesting! I've never tried GitHub desktop since I was trained to do it all on the terminal

Collapse
 
daveparr profile image
Dave Parr

I think this is such a little known feature, but so useful. I used this to host a personal bio/cv/portfolio website for years. It allows you to use many different static site generators as well. I think from memory I used hugo and jekyll at different points.

Well done for bringing this to more peoples attention :)

Collapse
 
robertsam2000 profile image
ROBERTSAM2000

Pretty sure files can also be uploaded from your PC while on github too

Collapse
 
tiaeastwood profile image
Tia Eastwood

I think so yes, there are definitely multiple ways of doing it!

Collapse
 
dianaramirez16 profile image
Diana Ramirez

this was such a great article thanks!

Collapse
 
mozayntwali profile image
Ntwari Moise

Thank you for the such a great article, I've had a hard time learning how to use github pages but your insights were really helpful.

Collapse
 
redcaptom profile image
Red Cap Tom

Yes! This!

This should somehow be much more obvious on GitHub's UI. It's such a great, simple feature that everyone I've ever talked to absolutely loves. My own site is also GitHub pages! :)

Collapse
 
ben profile image
Ben Halpern

Great post

Collapse
 
thefluxapex profile image
Ian Pride

I use and appreciate GITHUB IO (I have lots of IO sites, but only one public), but I'm one of those wierdos that actually likes PHP and you can't use PHP there. ๐Ÿ˜ข No other real complaints though.

Collapse
 
noveen112 profile image
eatyourvegetablesHYI

This is really helpful thanks!