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 was archived by the owner on Jan 11, 2023. It is now read-only.
Is your feature request related to a problem? Please describe.
I read https://sapper.svelte.dev/docs/#Base_URLs, it tells how to set base path for the whole website.
And I find that %sapper.base% in template.html is replaced by <base href="/"> by default.
But I want to customize the base path for some pages, for example, to shorten the img src.
Describe the solution you'd like
I tried to add in those pages
But since the first base path (by %sapper.base%) takes effect, it does not work.
So I think maybe %sapper.base% should be commented out of template.html.
And all the href values in %sapper.styles% and %sapper.head% should start with %sapper.base%.
This would make base path customization for some pages possible by <svelte:head>.
How important is this feature to you?
I think this is quite important.
To shorten the src is just one example.
Since the path may contain params, it would be easier for the page to set the base path, and the components on this page has no idea of the params.
The text was updated successfully, but these errors were encountered:
See #904. Sapper currently needs there to be a single site-wide base path, and we realize that's often inconvenient, but there are some hurdles to removing that requirement.
Is your feature request related to a problem? Please describe.
I read https://sapper.svelte.dev/docs/#Base_URLs, it tells how to set base path for the whole website.
And I find that
%sapper.base%
in template.html is replaced by<base href="/">
by default.But I want to customize the base path for some pages, for example, to shorten the img src.
Describe the solution you'd like
I tried to add in those pages
But since the first base path (by
%sapper.base%
) takes effect, it does not work.So I think maybe
%sapper.base%
should be commented out of template.html.And all the
href
values in%sapper.styles%
and%sapper.head%
should start with%sapper.base%
.This would make base path customization for some pages possible by
<svelte:head>
.How important is this feature to you?
I think this is quite important.
To shorten the src is just one example.
Since the path may contain params, it would be easier for the page to set the base path, and the components on this page has no idea of the params.
The text was updated successfully, but these errors were encountered: