Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub pages only showing ReadMe file?

Tags:

git

github

I'm trying to host my webpages into Github pages but for some reason it seems to only show my Readme file.

GitHub repo: https://github.com/InquisitiveDev2016/InquisitiveDev2016.github.io

Website:

https://inquisitivedev2016.github.io/

like image 903
Rookie Avatar asked Feb 22 '18 03:02

Rookie


People also ask

Why is my GitHub page displaying README?

Looks like you've got your content in a folder, so your site is sort of available here: https://ironmonkeeeee.github.io/ironmonkeeeee/public/. If you want that to be your homepage, you will need to move it into the root of the repository instead of that folder. Then you should be all set! Hope that helps!

Why my GitHub Pages is not working?

Solution: Verify the publishing source and published URL from your repository's settings tab. Double check that you are using the correct URL by visiting your repository's Settings, and scrolling down to the GitHub Pages section. You should see the URL where your site is published.

How do I view pages in GitHub?

Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Pages. Under "GitHub Pages", select the GitHub Pages visibility drop-down menu, then click a visibility. To see your published site, under "GitHub Pages", click your site's URL.


2 Answers

GitHub Pages is doing what it is designed to do: hosting that entire repository. The root of the repository only contains a single file (README.md). Other pages are there, e.g. https://inquisitivedev2016.github.io/Photo%20Website/webpage.html, but there isn't an easy way to navigate to them.

Consider moving your web content into the root of your repository and renaming your default page to index.md or index.html, depending what type of file it is. (By convention the default page of most websites is called index.html, and this is what GitHub Pages will show by default if it exists.)

like image 62
Chris Avatar answered Oct 09 '22 10:10

Chris


Github gives you multiple choices where it takes it sources from. By default its the root of the master branch, which will use the README.md in case there is no index.html.

But you can also switch to the docs/ folder in your repository settings. With that you can put the index.html under the docs/ folder.

See enter image description here

like image 28
oae Avatar answered Oct 09 '22 09:10

oae