githubhostinggithub-pagesgithub-desktop

I'm new to github and I can't get my repositories on github pages


I'm new, reaaaally new to github, not familiar at all, just created an account (by watching one old youtube tutorial). And this is my first time here too. Also, english isn't my first language, so I'm sorry for any mistakes.

I'm using the desktop GitHub, I'm not using Git right now (but also the tutorial guy wasn't and it worked easily) and pushing my local repositories to my online github, and it worked. There are four repos and all of them are public. Yet, when I go to my username.github.io there is nothing, it doesn't exist, that's one thing to fix.

Do I have to create some file? I don't understand, there are youtube videos that say you have to choose a theme, but it's been updated I guess because the website it's not like that anymore, and it doesn't show me themes or anything like that.

I've seen a lot of youtube videos and done exactly what they have done, i've read the github guidelines but i think they are confusing, but i tried a lot of different things. If it makes any difference, my repositories only have like .html and css files (plus the images, fonts, html and css stuff). I don't know anything other than hmtl and css yet, not even javascript, so that's it.

So I don't know how to proceed, I've extinguished my completly amateur resources by doind this post, and I'm learning by myself so I have no one to help me here. Also, since I've never had any contact with github, im just "github dumb", I don't know how branchs work, I'm sorry, I know what a branch is, but somehow that plataform makes it hard.

Anyway, I want to know why my username.github.io doesn't work...

Any help, please? :')


Solution

  • First, create a github repository of <username>.github.io and put your html/css files there. Then go to the repository settings and find the "pages" settings at the left.

    In the source, select "deploy from branch" and select your main branch and select the root directory and click save.

    That's it, your repository will be published to github pages and you can see the url at the top of the page.

    I have attached a screenshot if it is difficult to follow. Screenshot

    The same information can be found here.