Help with creating github pages

Hi there guys,

I am really struggling and feel like I just want to give up. I have spent all morning, essentially the past 4 hours, trying to set up a github pages webpage that is essentially a sub-domain rather than my username.github.io (as I have already been using that and do not want to overwrite).

I have watched countless videos and read the github docs information on how to do this but for some reason I cannot get it. Perhaps I have become blind to whatever the issue may be but I am really hoping for some support.

My repo is: https://github.com/CodeCleaver/excursion

I have tried going through the process of uploading via git bash for windows (I am working on windows) and I have been using the desktop app too. This is actually as far as I have managed to get. I have been able to upload these documents from my local drive via the desktop app - hurrah - the command line is actually super confusing for me and I get the steps and actually managed to upload my initial webpage through the command line.

I have gone into settings and set up the repo as per multiple tutorials - all documents are there - it commits and pushes from my local drive, I have enabled it as a github page and selected the branch as main.

When I visit https://codecleaver.github.io/excursion/ I get a 404 error however github states that the sit is published.

I expect somewhere along the line I have done something wrong - I am finding git to be very confusing so I know I am to blame for not doing one thing or another.

Anyway, can anyone see what I have done wrong by looking at this repo?

I am very much enjoying web design but as code academy is asking me to use github for publishing but I am completely stumped.

Thanks so much in advance and really sorry if this comes across as a bad question. I am at my wits end.

2 Likes

Hi,

We can work through this!

I made a quick example on my on github for you to see, let me know when you do so I can make it private again haha: https://pvbread.github.io/ and the way I structured it: GitHub - pvbread/pvbread.github.io.

Notice how the subdirectory has an index as well.

Alternatively you can have an html file is the same home directory, name it with the suffix .md, and it will become it’s own subdirectory page (this can get messy). So testing.html becomes testing.md and can be reached at pvbread.github.io.

2 Likes

@codecleaver did this help? I’m going to make it private again soon, so just checking.

Yes that is fantastic. Thanks so much!

A tip for anyone else stuck on this.

I had this exact problem. After hours I went to the Excursion repository - Settings, scrolled down to GitHub Pages and discovered that Pages were not enabled. Select Main from the Branch pull down menu and click Save. You should see the following message in the GitHub pages section of Settings within your Excursion Project repository:

Your site is published at https://username.github.io/excursion/

There is no reference to this step under the Github pages directions nor under Codecademy’s How to instructions. And I found no reference to it after literally hours of online searches.

If this is a standard or common stopping point, it’s a reprehensible omission from the lesson materials.

1 Like

Thank you bruzky the brave. I’m an experienced full-stack bootcamp grad who’s done dozens of repos and github pages in the past and am doing this course as a much-needer refresher; had NO idea why I couldn’t get this page online and could not find anything about it after looking over all the git modules I’d just done, again.