Search code examples
githubgithub-pages

How do I get my site to show up through github?


I uploaded my files to github, checked off readme, commit changes, selected masterbranch, and I got the following message as I scrolled down the page: Your site is published at https://tanishav842.github.io/Recipes/ but there is nothing there except for the word Recipes, which appears at the end of the site address that had been established for me through github. What did I do wrong?


Solution

  • Well, Tani, to have your own page hosted by GitHub Pages it need to be stored in one of the following places

    • In a public repository named <your-github-username>.github.io
    • Under a docs folder in master branch of any public repository you own
    • In gh-pages branch of any public repository you own

    It means your Recipes repository are pretty much there.

    Just copy your master branch content to a new branch named gh-pages and push it:

    git checkout -b gh-pages
    git push -u origin gh-pages
    

    In addiction, as commented Edric, it would be cool to have your pretty nice stuff added to your page.

    By now, I suppose GitHub is using your README.md that just have the word Recipes there!


    Anyways, Here you can find a bunch of details about Working with GitHub Pages and also some step-by-step tutorials to learn how to do it properly

    Hope this can help you!