Skip to content
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

Ignore group routes #9

Closed
astrojarred opened this issue May 22, 2023 · 0 comments · Fixed by #10
Closed

Ignore group routes #9

astrojarred opened this issue May 22, 2023 · 0 comments · Fixed by #10
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@astrojarred
Copy link
Owner

As per SvelteKit's advanced routing, directories can be contained in parenthesis (e.g. /src/routes/(group)/...) to separate groups of pages with different layouts.

These should be detected and:

  • if the +server.py is directly within a top-level /src/routes/(*) folder, this should be treated as the index / route.
  • if the +server.py is anywhere else underneath a any number of () pages, simply remove the entire section from the API endpoint URL and directory structure.

This follows the logic in the documentation linked above.

e.g.

src/routes/
│ (app)/
│ ├ +page.svelte   ---> API endpoint should be: `/api`
│ ├ item/
│ └ +layout.svelte
│ └ +page.svelte
│ └ +server.py     ---> API endpoint should be: `/api/item`
@astrojarred astrojarred added bug Something isn't working good first issue Good for newcomers labels May 22, 2023
@astrojarred astrojarred self-assigned this May 22, 2023
astrojarred added a commit that referenced this issue May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
1 participant