Skip to content

Commit 841af4f

Browse files
gtm-nayanbenmccann
andauthored
[docs] be more specific about the definition of page endpoints (#5198)
* [docs] be more specific about the definition of page endpoints * hopefully disambiguate by putting it after filename * split * apply suggestion * Update documentation/docs/02-routing.md Co-authored-by: Ben McCann <[email protected]> * Update documentation/docs/02-routing.md Co-authored-by: Ben McCann <[email protected]> Co-authored-by: Ben McCann <[email protected]>
1 parent aefefef commit 841af4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/docs/02-routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The job of a [request handler](/docs/types#sveltejs-kit-requesthandler) is to re
100100

101101
#### Page endpoints
102102

103-
If an endpoint has the same filename as a page (except for the extension), the page gets its props from the endpoint — via `fetch` during client-side navigation, or via direct function call during SSR.
103+
If an endpoint has the same filename as a page (except for the extension), the page gets its props from the endpoint — via `fetch` during client-side navigation, or via direct function call during SSR. If a page uses syntax for [named layouts](/docs/layouts#named-layouts) or [matchers](/docs/routing#advanced-routing-matching) in its filename then the corresponding page endpoint's filename must also include them.
104104

105105
A page like `src/routes/items/[id].svelte` could get its props from the `body` in the endpoint above:
106106

0 commit comments

Comments
 (0)