Ad

GitHub Pages Not Able To Update Index.html Meta Tags With Create React App(CRA)

GitHub pages wrap my create-react-app's index.html with its own index.html file.

The original index.html file has meta tags, the GitHub's does not.

I am not able to alter metadata of Github's index.html file and it does not use the metadata from the original CRA's index.html.

How to fix this?

enter image description here

The project has the basic React project file structure:

enter image description here

Ad

Answer

I noticed that create-react-app was removing CNAME file from my build folder what caused unnecessary creation of iframe. Moving CNAME file to /public directory fixed the issue.

This is where I have found the answer I was looking for: https://github.com/tschaub/gh-pages/issues/127

Ad
source: stackoverflow.com
Ad