Environment
n/a
Reproduction
See https://unjs.io/packages/magicast, specifically the links to the source code and test cases near the bottom highlighted here. Navigating to these links (https://raw.githubusercontent.com/unjs/magicast/main/src/helpers or https://raw.githubusercontent.com/unjs/magicast/main/test/helpers) will result in a 404 page.
Describe the bug
The original issue was that relative links did not work outside Github, see #24 which was resolved by #52.
The solution was to replace the relative URLs with absolute ones, essentially prefixing with 'https://raw.githubusercontent.com', this works fine for images/assets but does not work for directories. As seen on magicast docs, ./src/helpers is replaced with https://raw.githubusercontent.com/unjs/magicast/main/src/helpers.
Not sure how this can be resolved 🤔 I'm assuming checking each URL for a 404 would be a bit too much. Maybe checking for file extensions? But some file links have no extension like LICENSE.
Additional context
No response
Logs
No response
Environment
n/a
Reproduction
See https://unjs.io/packages/magicast, specifically the links to the source code and test cases near the bottom highlighted here. Navigating to these links (https://raw.githubusercontent.com/unjs/magicast/main/src/helpers or https://raw.githubusercontent.com/unjs/magicast/main/test/helpers) will result in a 404 page.
Describe the bug
The original issue was that relative links did not work outside Github, see #24 which was resolved by #52.
The solution was to replace the relative URLs with absolute ones, essentially prefixing with
'https://raw.githubusercontent.com', this works fine for images/assets but does not work for directories. As seen on magicast docs,./src/helpersis replaced withhttps://raw.githubusercontent.com/unjs/magicast/main/src/helpers.Not sure how this can be resolved 🤔 I'm assuming checking each URL for a 404 would be a bit too much. Maybe checking for file extensions? But some file links have no extension like
LICENSE.Additional context
No response
Logs
No response