GitHub Pages only supports readme file rendering
P粉262113569
P粉262113569 2023-08-15 13:25:40
0
2
401
<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>
P粉262113569
P粉262113569

reply all(2)
P粉282627613

To resolve an issue where a website hosted on GitHub Pages only displays the README page, follow these steps:

  1. 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 the master branch in the repository. If you want to use a different branch, you need to specify this in the repository settings.

  2. 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.

  3. Confirm the index file: GitHub Pages looks for the index.html file by default. Make sure your homepage file is named index.html. If named differently, the files can be specified in the repository settings.

  4. 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.

  5. 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.

  6. Verify DNS settings (if applicable): If you are using a custom domain name, check the DNS settings to ensure they are configured correctly

P粉736935587

This is expected behavior, according to the GitHub Pages documentation :

You need to provide an index.html or index.md file in the top-level directory (not inside the directory!), or put your content into README.md middle.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!