Tani
Tani

Reputation: 17

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?

Upvotes: 1

Views: 2475

Answers (2)

artu-hnrq
artu-hnrq

Reputation: 1527

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!

Upvotes: 1

Andr&#233; Pina
Andr&#233; Pina

Reputation: 1

Hosting a site is better supported by the GitHub application. Try following these steps to see if they help:

  1. Download either GitHub for Mac or GitHub for Windows, depending on your operating system. Open the app and log in using the account you just created.

  2. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.

  3. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  4. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
  5. Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called "commit summary", something like "initial commit." Then, click the commit button.
  6. Click the "Publish repo" button in the top right corner.
  7. Give it about 10 minutes, then check your-username.github.io. Your website should be there!

Here's the reference link: https://gist.github.com/TylerFisher/6127328

Upvotes: 0

Related Questions