gpt4 book ai didi

reactjs - 在自定义域上托管 gh 页面,白色空白页面

转载 作者:行者123 更新时间:2023-12-05 01:01:27 26 4
gpt4 key购买 nike

我是编码新手,需要一些帮助。 我做了一个 react 项目(使用 create-react-app),网站一直在我的 gh-pages 分支上运行

(这是我的仓库:https://github.com/simchaleh/shivisihashem.git)

我一直在尝试在自定义域上托管 gh-pages 项目。我的 react 项目托管在 gh-pages 上时看起来很棒,但是当我尝试将其连接到我的自定义域时,我得到的只是一个纯白屏幕。

这是我在自定义域上的 dns 设置的屏幕图片。 (你还可以看到 gh-pages 说它托管在我的域上): dns settings and gh-pages/settings page

我在 gh-pages 分支中有一个 CNAME 文件,只有一行,我在其中放置:shivisihashem.com

有人知道为什么我的自定义域上出现空白屏幕吗?

谢谢!

最佳答案

我刚刚从 github 工作人员那里得到了答复。它解决了我的问题。如果其他人有同样的问题,这就是答案:

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.

关于reactjs - 在自定义域上托管 gh 页面,白色空白页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44484377/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com