hosting gh-pages on custom domain, white empty page

◇◆丶佛笑我妖孽 提交于 2019-12-08 04:17:27

i just got an answer from github staff. it solved my issue. heres the answer if anyone else has this same issue:

The file you need to edit is here:

https://github.com/simchaleh/shivisihashem/blob/gh-pages/index.html

Currently, these two sections have errors:

<script type="text/javascript"
> src="/ShivisiHashem/static/js/main.7cdb5ccf.js"></script>
> 
> <link href="/ShivisiHashem/static/css/main.ff643f95.css"
> rel="stylesheet">

You should be able to resolve the issue by replacing them with these:

<script type="text/javascript"
> src="/static/js/main.7cdb5ccf.js"></script>
> 
> <link href="/static/css/main.ff643f95.css" rel="stylesheet">

I hope that helps! Let us know if you have any other issues.

Had this same problem. I believe this issue is caused when you use the PUBLIC_URL environment variable, like so:

%PUBLIC_URL%/main.css

which works for the github.io site but causes path problems in the custom domain, which adds the variable in front of the path like in Simcha's example. So, we need to manually remove every instance of the this variable (process.env.PUBLIC_URL) each time we build for gh-pages.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!