You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
After exporting the default sapper-template with the npx sapper export command, I would like to use it somewhere in a subfolder. It works if I serve it via http://example.org (with nginx or similar) but not if I host it in a subfolder http://example.org/my-sapper-website (example: if I want to host it on Github Pages). It's because all URL starts with slashes in routes and templates. I could change all the URL to make them relatives (removing the slash in HTML), but I not sure it's the right way.
Is there a way to export for hosting in subfolder without rewriting all the routes files?
Sorry if it's not the right place to ask this kind of questions, maybe I should have posted on Stackoverflow
The text was updated successfully, but these errors were encountered:
Hi @rap2hpoutre! That's a good point. There is currently no way to achieve this.
It might be worth exploring if the CLI could be expanded to take an argument to specify a base URL, which could be added to relative URLs when the a tags are extracted.
I'm going to close this issue in favour of #180, as it's something that also applies to non-exported sites, so we should have a fix that covers both scenarios
After exporting the default sapper-template with the
npx sapper export
command, I would like to use it somewhere in a subfolder. It works if I serve it via http://example.org (with nginx or similar) but not if I host it in a subfolder http://example.org/my-sapper-website (example: if I want to host it on Github Pages). It's because all URL starts with slashes inroutes
andtemplates
. I could change all the URL to make them relatives (removing the slash in HTML), but I not sure it's the right way.Is there a way to export for hosting in subfolder without rewriting all the routes files?
Sorry if it's not the right place to ask this kind of questions, maybe I should have posted on Stackoverflow
The text was updated successfully, but these errors were encountered: