-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
vite-plugin-kit-routes: support anchor pages #799
Comments
Thx for reporting 👍 |
I have resolved: So only issue is anchor page |
I'm back :) In Something like: kitRoutes({
PAGES: {
'/site': {
anchors: '"part1" | "part2"'
}
}
}) To be used like: route("/site", { __anchor: 'part2' }) Woudl this be good for you ? |
@arkmech any update ? |
Seems like a valid api to me |
I started... and started to think about something else... Why not mixing it with kitRoutes({
PAGES: {
'/site': {
explicit_search_params: { anchor: { type: '"section1" | "section2" | "section3"', required: true, isAnchor: true } },
}
}
}) It's not that nice to have it in Any hints ? Or you don't really care ? |
Doesn’t matter, whatever makes sense the most sense in your implementation |
All right, would you test |
Hey, just checking in here as this is also something I was looking for. Excited for any solution to this as it's nice to have type safety for all routes. With that said
Here's what I'd recommend: kitRoutes<KIT_ROUTES>({
PAGES: {
'/site': {
// the URL class in js refers to this as a hash, but anchor would also be fine
hash: {
default: 'section1',
type: '"section1" | "section2" | "section3"',
required: true,
},
},
},
}) |
I agree with you @OllieJT 👍 Did you check It's funny, you are saying:
But in the end, maybe not any solution ^^ I released under After all, it's all about time & motivation :D |
@jycouet I am excited for any solution ...but it looked like you were asking for feedback - so I shared my thoughts. I'd love to jump in and help but I don't know when I'll have time at the moment. If you're open to contributions and I have time in the next week to learn how this works - I'd be happy to take a shot at it. |
Sweet! I'm very open to contribution yes 😊 |
What do you think of: |
Commented on the PR to keep it in context. |
Is your feature request related to a problem? Please describe.
example.com#section
Describe the solution you'd like
LINKS
Describe alternatives you've considered
env.local
andenv
, lose type-safety.${route('/')}#
The text was updated successfully, but these errors were encountered: