Search code examples
flaskgithub-pages

The page isn't loading up on Github


I'm trying to turn my repo in a website for a school project and receiving this error:

404 File not found

The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file.

The link to my repo: https://github.com/NikitaLikhotvorik/final

It doesn't even have a custom URL yet but it does not load. And yes, I did select /root in Github Page branch settings


Solution

  • TL;DR: I suggest that you move the .html and .css files to a /docs folder and target that folder in the build of GitHub pages.


    As said in this documentation About GitHub Pages:

    GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub...

    So GitHub pages presume that an index.html or a README.md file should exist in the root of the project (or the docs folder if you choose it) to show on the deployed page and in the root of your GitHub repo doesn't have either.