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
Is your feature request related to a problem? Please describe.
We can currently have routes described by either <name>.svelte or <name>/index.svelte, whose path when served will be /name unless configured otherwise. We can also use layout resets in the <name>/__layout.reset.svelte to override the root __layout.svelte. However, we don't seem to be able to apply this reset pattern to the index page, / (for example, we can't do `index/__layout.reset.svelte). My use case is that all the non-index pages use a standard banner except the home page, where I'd like a different style of banner, so while for any other page the existing functionality works perfectly, we can't apply it to the index.
Describe the solution you'd like
Be able to reset the layout for the index page. For example, perhaps allow for a pattern like index/__layout.reset.svelte and index/index.svelte, which would be served from / but with the layout overridden.
Describe alternatives you've considered
Use a different name, like home/index.svelte with a layout reset, and then in the config make it be served from /, but I don't believe this is possible either...
How important is this feature to you?
Medium
The text was updated successfully, but these errors were encountered:
To me this sounds like it's a level of customization that is best tackled with custom logic in your layout file. You can keep track of the current route and hide the banner if you are on home.
Is your feature request related to a problem? Please describe.
We can currently have routes described by either
<name>.svelte
or<name>/index.svelte
, whose path when served will be/name
unless configured otherwise. We can also use layout resets in the<name>/__layout.reset.svelte
to override the root __layout.svelte. However, we don't seem to be able to apply this reset pattern to the index page,/
(for example, we can't do `index/__layout.reset.svelte). My use case is that all the non-index pages use a standard banner except the home page, where I'd like a different style of banner, so while for any other page the existing functionality works perfectly, we can't apply it to the index.Describe the solution you'd like
Be able to reset the layout for the index page. For example, perhaps allow for a pattern like
index/__layout.reset.svelte
andindex/index.svelte
, which would be served from/
but with the layout overridden.Describe alternatives you've considered
Use a different name, like
home/index.svelte
with a layout reset, and then in the config make it be served from/
, but I don't believe this is possible either...How important is this feature to you?
Medium
The text was updated successfully, but these errors were encountered: