Skip to content
Discussion options

You must be logged in to vote

This should work:

routes
  [[user=handle]]
    (user-only)
      +page.svelte
    (with-tags)
      [tag]
        [xtag]
          +page.svelte

I checked all use cases, these worked:
/
/@user
/tag/foo
/@user/tag/foo

and this one didn't:
/tag

You'll have two different pages (one with tags, one without - the user is optional in both), but I doubt it's possible otherwise. AFAIK you can't e.g. express that either both or none of [tag] and [xtag] have to be present. The trick with the routing groups above solves it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kael
Comment options

Answer selected by kael
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants