Search code examples
githubgithub-pages

GitHub Pages Not Rendering HTML or MD Files on Newly Created Repository


I've been working with GitHub Pages but for the life of me my pages will not render.

I've named the repository with the account username along with the postfix of github.io, yet when I go to the designated URL to view the GitLab Pages I get a 404 error.

enter image description here

It's a new account, a new and correctly named repo with Jekyll and HTML pages in the root of the project. Yet 404 errors abound. Any thoughts?


Solution

  • What branch are you on?

    GitHub Pages only currently renders files on the master branch. However, new repos do not create a master branch. They create a branch called main to avoid the racist overtones of the term master.

    So you will need to create a new branch called master and add Jekyll and HTML files there. Commit and push to GitHub and your GitHub pages will work.

    Basically, make sure your files are in the master branch. Soon GitHub Pages will likely use the main branch by default but not yet.