-
Notifications
You must be signed in to change notification settings - Fork 325
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
Point relative paths to documents in ipfs directory #361
Comments
I think this is quite doable: we already normalize links ( In this case we would inject a similar content script, but only into every page under root of IPFS CID. It would normalize paths in DOM + observe every DOM change (so that it works even with dynamic pages). |
I think it be surprising if we start rewriting valid, domain-relative links like It's super nice to be able to deploy an app to ipfs.io/QmHash/index.html and cool.website/index.html and have it all work under both root or an arbitrary mount path, but for that to work the author needs to build their site with location relative links. If we rewrite them, then to the site author it will look like the site works correctly in both contexts, but it'll be broken for anyone not running the plugin. It could be argued that lots of things will be published to ipfs with broken, root relative links, but I feel uneasy about companion papering over that issue. |
I agree with Oli, we should not mutate paths used in attributes of DOM elements. |
For IPFS websites that have relative links such as
/about
, it'd be great if the extension modified the links tohttp://mygateway/ipfs/hash/about.html
. Currently, clicking that link takes you tohttp://mygateway/about
.The text was updated successfully, but these errors were encountered: