-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets not loading on GitHub Pages with Custom Domain #8316
Comments
I'm guessing it's related to this note? /~https://github.com/zeit/next.js/wiki/Deploying-a-Next.js-app-into-GitHub-Pages#extra-step-for-project-page-sites This doesn't sound like a particular bug with Next.js, more-so hosting configuration side. Might be interesting to look into hosting on https://zeit.co. |
I don't think it is related to the assetPrefix because I'm using a custom domain. Should be under /_next then, no? It could be a problem on the host. But if gh-pages is part of the documentation, it should work, shouldn't it? |
@leon-wbr have you solve it? I've got the same problem. You can check it under: |
If you are having a similar problem and found this issue, here is what solved my problem. Had a similar problem, on my case it was the "scripts": {
...
"static": "next build && next export && touch ./out/.nojekyll && echo 'evandro.sasse.it' > ./out/CNAME",
...
}, The link @timneutkens posted doesnt work anymore, but you can find more information on this issue: #2029. BUT... I am also using "scripts": {
...
"deploy": "gh-pages -d out -t true"
...
}, |
GH pages was having some issue in serving assets. So added the .nojekyll file to fix this as per vercel/next.js#8316
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
I'm hosting my exported static page on gh-pages with a custom domain.
Error shown is as follows:
Images are loaded fine. It's only hashed files which don't work.
To Reproduce
Export and push to gh-pages.
Expected behavior
Site renders properly and loads all assets as it should.
System information
The text was updated successfully, but these errors were encountered: