IPFS hosting with static assetPrefix
#10745
Unanswered
NoahZinsmeister
asked this question in
Help
Replies: 1 comment
-
I have a solution. code is here https://github.com/DnCov/transparent-info/blob/master/.github/workflows/auto_release.yml |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm trying to host a fully statically exported Next.js site on both DNS as well as IPFS. So far, I've achieved this by using a build-time flag, and optionally prefixing a tag
href
s, img tagsrc
s, etc., with'.'
with a custom base tag so that my site can be served on e.g.https://ipfs.io/ipns/<...>/
. I also have to make assetPrefix'.'
when building for IPFS. The problem is that once I'm >1 route deep, assetPrefix breaks, as it begins looking for shared_next
resources relative to the current path, whereas it should actually be looking relative to my custom base tag.One solution to this may be a dynamic
assetPrefix
, but as far as I can tell this is impossible in statically exported sites. Is there another possible solution that I'm missing?Beta Was this translation helpful? Give feedback.
All reactions