Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Creating a Project Pages Site

Is it possible to host a site with multiple pages on GitHub Pages?

Index.html works fine but my other pages throw a 404 error even though they seem to be linked correctly. Plus, the links work on my local server.

3 Answers

Gabriel Plackey
Gabriel Plackey
11,064 Points

Yes it is. File path could have to be different for the files on github VS the ones on your local server.

Thanks. You were right. I was linking to my pages using certain kind of absolute link. So, for the about page my href value was "/about/". The first forward slash tells Chrome Web Server on my local machine to go to the root and then look for the about page. Apparently GiHub pages works differently. All i had to do was change the href value to "about/" and it worked fine. Thanks again!

Gabriel Plackey
Gabriel Plackey
11,064 Points

Could take a look at your repo if you want, see if I can find anything that looks wrong with the file paths or anything.

Hey Tyler,

As Gabriel mentioned, you should have no problem having a multi-page site on GitHub pages. I host a variety of sites on GitHub, including a Jekyll blog.

Yep, you're right! I got to work. Thank you. I know this is off topic but do you know if any good Jekyll tutorials? Treehouse took down the Jekyll basics course because it was outdated and I'm having trouble finding a decent one out there in the non treehouse world. Thanks again!