githubjekyllgithub-pagesblogs

Jekyll deployed in github shows raw text of index.html file


I am trying to deploy the Jekyll website using the forked repo from https://github.com/cotes2020/jekyll-theme-chirpy theme. On my local system, all works fine. I have followed through all the instructions given in https://chirpy.cotes.page/posts/getting-started/#deployment and all appears to be ok. Even Github build status also indicates that the site is up and running at https://wxguy.github.io. However, when I access https://wxguy.github.io from firefox, The following line is displayed:-

--- layout: home # Index page --- 

This is the exact content of the index.html located at the root of the project. I have renamed the index.html to index.md and deployed it again to GitHub. But still, the problem persists.

Next, I copied the content of _layouts/home.html to index.html again pushed it to GitHub. This time, it only displayed the text of Front Matter.

From the message I received on the firefox, it appears that GitHub is not building Jekyll site properly. I have deployed my site on the master branch in the remote.

I have gone through other blog source files which use the same theme at https://github.com/v3rtumnus/jekyll-blog. I am not able to figure out if any major changes I made to any configuration files. Can someone help me to resolve this issue?


Solution

  • I got the issue solved by doing the following:-

    1. The theme I am using uses GitHub action and hence I have to configure it under GitHub/username/username.io/settings --> Actions --> General --> Scroll down the page to select "Workflow Permissions" and "Read and write permissions".
    2. Deploy your modified site to Github.
    3. Go to again settings GitHub/username/username.io --> Check if the workflow is completed successfully. If not, then rerun the process.
    4. Go to settings -- > Pages --> Select gh-pages as a branch and /root as a directory.
    5. Wait for a few min and your site should be up and running.

    I also found that there was an issue with the browser cache which was not allowing a new page to load from the server. Therefore, I opened the site in private mode.

    Hope it helps others.