Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 812
zilijonas Avatar asked Sep 21 '19 13:09

zilijonas


1 Answers

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

like image 70
zilijonas Avatar answered Nov 16 '22 14:11

zilijonas