'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 1:[1]
I got the issue solved by doing the following:-
- 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".
- Deploy your modified site to Github.
- Go to again settings GitHub/username/username.io --> Check if the workflow is completed successfully. If not, then rerun the process.
- Go to settings -- > Pages --> Select
gh-pagesas a branch and/rootas a directory. - 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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | sundar_ima |
