Open apporc opened 6 years ago
This is a known limitation. Have you searched for a duplicate issue?
Is this hard to implement, i have searched the code, got to transform/absurlreplacer.go, but i am not really familar with go.
Is this hard to implement
Yes it is.
I suggest you look for older threads and workarounds for this.
I searched again in the older threads, didn't find a workaround. But i thought out an ugly one for myself, to restrict all my production environment with the same root.
Since 0.43 this can be done with hugo pipers. This issue can be closed.
@bep Can this issue be closed?
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Currenctly, relativeURLs only process those urls specified as href, for urls inside a style tag, it doesn't work.
For example
This tag is coded like that in an html file, which will be included in many other htmls. Now in every html file, it is always './fonts/icon.eot', but there are cases it should be '../fonts/icon.eot' or '../../fonts/icon.eot'.
It seems like others have submitted issues similar. Let me clarify why this feature is needed, it's just like the href tag case.
I am hosting my same site code on many different production environment, and they may have different root. As in a environment A, the hugo site will be visited under http://example.com/, but in environment B, it is visited under http://example.com/hugo. As you can see, i can't use '/fonts/icon.eot' because the root is different.
This example what i extracted from ipfs static blog site. I want to visit my site from https://ipfs.io/ipns/... or a web hosting of mine with http://example.com/. Hope you understand now.