axodotdev/oranda

path_prefix is too much config, make all links relative instead?

Opened this issue · 0 comments

I just set up a oranda page, and it didn't work out of the box on github pages. So I had to install the preview build to get it working with path_prefix (BTW: it's not clear from the docs that the build_prefix feature is not in the latest stable version, and it doesn't help that oranda ignores unknown config silently)

But it got me wondering, can't oranda just produce links like ./artifacts.js or ../artifacts.js so that the page just works everywhere, instead of making the user do this confguration?

It would also remove the need to do weird things for the devserver like serve the site at localhost:7979/<build_prefix>, though this might have been chosen intentionally to make it easier to debug user-defined links in the README.

I tried implementing it, but it would require generating the header HTML multiple times for each page. Unsure how to deduplicate the calls to fetch_logo when I do that (just have a global cache?)