-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Routify style helpers and functionality #822
Comments
+1 for Layout Reset files @kevmodrome . A simple use case for the same is, a dynamic website and its management panel in a single SvelteKit project. Both will need a separate $layout and even separate $error files. |
That sounds like a reasonable solution to me. I had completely missed that issue - my bad! You might be right about the url and isActive helpers. I suppose I just like the idea of having a quick and easy way to check if the page i'm on is active. In fairness I one could just as well use the page.path and stick an includes('some-path') on there 🤷 The layout one is pretty nice though, it makes it possible to reach into the manifest (is there one in kit?) and grab the children of a route in a very accessible way. One example is the sidebar on the recipe pages on the Svelte Society website and structure for reference. Makes for a great experience when you're building documentation style websites. One downside to this is that we one might want a way to set page titles on routes since you might not always want the file name as your title. In the end, maybe not worth it. Edit: another feature Routify has is the _fallback.svelte one that acts as a catch-all for any routes "beneath" it. Would that be the solvable using [...something] in Kit? |
There is no developer-accessible manifest, and even if there was we don't have a way to set the title of a given page that would be visible to said manifest. Even if we did, that would exclude dynamic routes (think |
Fair enough. That makes sense. Cheers! |
@Rich-Harris just curious, why is |
@benmccann data is cheaper than code! the |
@kevmodrome How are you managing this at the moment? I was getting rid of routify but then got stuck here. |
There's some info in how to convert here: svelte-society/sveltesociety.dev#223 (comment) |
Having used Routify on a number of projects and now trying out Kit I find myself missing some of the helpers.
I think these helpers in particular are of great value:
In addition to this, I find Routify's concept of a layout reset file very compelling. It's also something that constantly comes up up again and again in the Discord.
The alternative to these features is obviously to make them yourself but some of these features are very oft-used.
These helpers aren't super important important but overall I think they make it a lot easier to construct applications.
The text was updated successfully, but these errors were encountered: