GitHub Pages only supports readme file rendering
P粉262113569
2023-08-15 13:25:40
<p>This is my repository: <a href="https://github.com/kalrasarthak/ReFash">https://github.com/kalrasarthak/ReFash</a></p> ;
<p>This is the page link:</p>
<p><a href="https://kalrasarthak.github.io/ReFash/">https://kalrasarthak.github.io/ReFash/</a></p>
<p>I tried the solutions provided here, but those are no longer the same. </p>
<p>How do I fix an issue where my website hosted on GitHub Pages only displays the README page? </p>
To resolve an issue where a website hosted on GitHub Pages only displays the README page, follow these steps:
Verify branches: Make sure the branches you want to display on GitHub Pages are set up correctly. By default, GitHub Pages deploys content from the
gh-pages
branch or themaster
branch in the repository. If you want to use a different branch, you need to specify this in the repository settings.Check directory structure: Make sure your website files are in the correct directory. In most cases, you will need to place HTML, CSS, and other resources in the root folder of the repository.
Confirm the index file: GitHub Pages looks for the
index.html
file by default. Make sure your homepage file is namedindex.html
. If named differently, the files can be specified in the repository settings.Update repository settings: Go to your repository's Settings tab and scroll down to the GitHub Pages section. Make sure you choose the correct source. You can select a branch or root folder to use for hosting.
If it is a
React.js
application, please use the Github operation of React.js. Other frameworks such as Angular, Gatsby, and Next.js are similar. You can't use simple operations with applications from frameworks like React.js.Verify DNS settings (if applicable): If you are using a custom domain name, check the DNS settings to ensure they are configured correctly
This is expected behavior, according to the GitHub Pages documentation :
You need to provide an
index.html
orindex.md
file in the top-level directory (not inside the directory!), or put your content intoREADME.md
middle.