-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow layout reset for index page #1685
Labels
Comments
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. |
Yup, based on the suggestion by @dummdidumm I just pulled off page.path and did some comparisons |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: