This repository was archived by the owner on Aug 5, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork238
Commit2ab9dba
tutorial (#105)
* start of routing tutorial* more chapters* slots* chapter skeletons* mutating data section* Apply suggestions from code reviewCo-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>* errors and redirects chapter* invalidation chapter* render options section* add missing meta.json files* advanced routing wip* fix link* matching, groups* use new capabilities to adjust tutorials* remove duplicate layout from page* more sections* tweaks* remove log* disable csrf for tutorial* more content* fix interval* leverage adding files functionality for error tutorial* simplify* tweak tutorials so people have to create the files* tweaks* tweaks and fixes* Update content/tutorial/02-sveltekit/03-mutating-data/04-progressive-enhancement/README.mdCo-authored-by: Geoff Rich <4992896+geoffrich@users.noreply.github.com>* switch example, because alert will prevent the ping events, resulting in an endless alert loop because of constant iframe reloads* labels for inputs* tweaks and fixes* fix* environment variables tutorial* fixes* Update content/tutorial/02-sveltekit/01-concepts/03-server-and-client/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/03-server-and-client/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/04-server-side-rendering/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/04-server-side-rendering/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/05-prerendering/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/05-prerendering/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/01-concepts/05-prerendering/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/app-a/src/routes/+page.svelteCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/app-a/src/routes/about/+page.svelteCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/02-layouts/app-b/src/routes/+layout.svelteCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/03-loading-data/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/04-loading-layout-data/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/02-routing/07-params/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/03-mutating-data/02-form-validation/app-b/src/routes/+page.server.jsCo-authored-by: Rich Harris <hello@rich-harris.dev>* lowercaseCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/06-rendering-options/02-ssr/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/02-sveltekit/06-rendering-options/03-csr/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/04-advanced-sveltekit/01-advanced-routing/01-optional-params/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/04-advanced-sveltekit/01-advanced-routing/02-rest-params/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/04-advanced-sveltekit/01-advanced-routing/03-param-matchers/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* Update content/tutorial/04-advanced-sveltekit/01-advanced-routing/04-layout-groups/README.mdCo-authored-by: Rich Harris <hello@rich-harris.dev>* move explanatory content from concepts into render options chapter* remove backticks* Update content/tutorial/02-sveltekit/02-routing/05-loading-server-data/README.mdCo-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>* Update content/tutorial/02-sveltekit/02-routing/03-loading-data/README.md* Loading (#115)* shuffle sections around* update error page* update params section* rename* update some content* HN example* update API route docs* fix script* tweaks* typo* fixes* fix* tweaks* use __delete* add some css* allow files to be marked for deletion* [chore] bump deps* [chore] robustify create-middlewareCo-authored-by: Rich Harris <hello@rich-harris.dev>* [chore] handle offline case in +error.svelteCo-authored-by: Rich Harris <hello@rich-harris.dev>* [fix] style "/// file: .." pragmas in code blocksCo-authored-by: Rich Harris <hello@rich-harris.dev>* [feat] __delete inside file means delete that fileCo-authored-by: Rich Harris <hello@rich-harris.dev>* next* fix lockfile* tweaks* [feat] __hidden file to mark folders as hidden* use hidden API instead* Update content/tutorial/02-sveltekit/02-routing/07-api-routes/README.mdCo-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>* fix casing* note configurability* remove mention of vite* fix solve button styles* only add data-file attribute to files* separate routing and loading into separate sections, etc* remove $types, for now* move stuff* use a todo list example - better showcases PE, avoids complexity around user/session management* swap exercise order* flesh out form examples* move invalidation to advanced section* tweak page options docs* move* flesh out example to show use of page store etc* small tweaks* better redirects tutorial* move $page.X usage into second chapter* await parent* tweaks* better private env tutorials* get rid of VITE_ prefix* fix gitignore* remove logging* fix* fixes* invalid -> fail* robustify* rename section to the less-ambiguous "exercise" for my own sanity* allow an exercise to inherit files from previous exercises to reduce duplication* remove some now-unnecessary files* delete file* hide error customisation exercise for now - not ready to talk about hooks* update errors and redirects section* more detail* tweaks* add inspector* formatting* make "next" links more sensible* fix chaining logic* update optional params example* rest params example* different param matcher example* tidy up* move some content around* add placeholder chapters on hooks and stores* env var stuff* oops, didnt mean to add these* tweak* style tweaks* move filetree components to separate folder to ease future refactoring* tweaks* remove warning spiel* update deps* use a regex* Revert "use a regex"This reverts commitac9f872.* try this instead* use +layout.server.js instead of tutorial.json* make typescript a bit less complainy* show current exercise in menu* refactor filetree stuff a bit* remove unused import* simplify file creation, always select newly created file* move icons* oops* derive depth at point of use* simplify renaming* simplify* refactor filetree* remove unused import* make editing constraints visible - is more accessible etc* use a store for filesystem state* make constraints more granular* DRY things out a bit* more DRYing out* insertion order* various fixes* a11y fix* fix* context menu styling* fixes* DRY out actions* fix* fix* fix* DRY out some more* refactor* split up env var exercises* fix* put <img> inside <button>* remove some unnecessary files* add route group example that includes a load function* shuffle things around a bit* make breakout example more visual* oops* bump kit* add way to relax file tree constraints* fix complete/reset state toggle* pretty sure we actually want to check in the lockfile* tweak* remove TODO* tweak example* demonstrate returning non-serializable data from load function* rename exercise to invalidation* show a case where one load is invalidated and one isnt* follow previous exercise, use generic data:blah key* follow previous exercise* add coming soon messages to get us off the hook for now* remove old TODO* work around hotlinking limitation* remove __hidden mechanism, its way too confusing. comment out this exercise until we can investigate truncated bodies* add some default styles etc* more tidying up* explain CSRF stuffCo-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>Co-authored-by: Geoff Rich <4992896+geoffrich@users.noreply.github.com>Co-authored-by: Rich Harris <hello@rich-harris.dev>Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>1 parent726013c commit2ab9dba
File tree
277 files changed
+6395
-2082
lines changed- content/tutorial
- 01-svelte/01-introduction/01-welcome-to-svelte
- 02-sveltekit
- 01-concepts
- 01-introducing-sveltekit
- 02-project-structure/app-a/src/routes
- 03-server-and-client
- app-a/src/routes
- 04-server-side-rendering
- app-a/src/routes
- 05-prerendering
- app-a/src/routes
- 02-routing
- 01-pages
- app-a/src/routes
- app-b/src/routes/about
- 02-endpoints
- app-a/src/routes
- about
- app-b/src/routes/about
- 02-layouts
- app-b/src/routes
- about
- 03-params
- app-a/src/routes
- blog
- app-b/src/routes/blog/[slug]
- 03-loading-data
- 01-page-data
- app-a/src/routes
- blog
- [slug]
- app-b/src/routes/blog
- [slug]
- 02-layout-data
- app-b/src/routes/blog
- [slug]
- 03-universal-load-functions
- 04-forms
- 01-the-form-element
- app-a/src
- lib/server
- routes
- app-b/src/routes
- 02-named-form-actions
- app-b/src/routes
- 03-form-validation
- app-b/src
- lib/server
- routes
- 04-progressive-enhancement
- app-b/src/routes
- 05-customizing-use-enhance
- app-b/src/routes
- 05-api-routes
- 01-get-handlers
- app-a/src/routes
- app-b/src/routes
- roll
- 02-post-put-patch-delete
- app-a/src/routes
- app-b/src/routes
- 06-errors-and-redirects
- 01-error-basics
- app-a/src/routes
- expected
- unexpected
- 02-error-pages
- app-b/src/routes
- expected
- 03-fallback-errors
- app-b/src
- routes
- 04-redirects
- app-a/src/routes
- a
- b
- app-b/src/routes/a
- xx-custom-error-messages
- app-a/src
- routes
- about
- app-b/src
- routes
- 07-page-options
- 01-page-options
- app-a/src/routes
- 02-ssr
- app-a/src/routes
- app-b/src/routes
- 03-csr
- app-a/src/routes
- app-b/src/routes
- 04-prerender
- app-a/src/routes
- app-b/src/routes
- 05-trailingslash
- app-a/src/routes
- always
- ignore
- never
- app-b/src/routes
- always
- ignore
- 03-advanced-svelte/08-context/01-context-api
- app-a/src/lib
- app-b/src/lib
- 04-advanced-sveltekit
- 01-hooks
- 01-handle
- 01-todo
- 01-sandbox
- app-a
- node_modules
- cjs-dep
- esm-dep
- src
- lib
- routes
- 02-stores
- 01-page-store
- 02-navigating-store
- 03-updated-store
- 03-advanced-routing
- 01-optional-params
- app-a/src/routes
- [lang]
- app-b/src/routes
- [[lang]]
- [lang]
- 02-rest-params
- app-a/src/routes/[path]
- app-b/src/routes
- [...path]
- [path]
- 03-param-matchers
- app-a/src/routes
- colors/[color]
- app-b/src
- params
- routes/colors
- [color=hex]
- [color]
- 04-route-groups
- app-a/src/routes
- about
- account
- app
- login
- logout
- app-b/src/routes
- (authed)
- account
- app
- account
- app
- 05-breaking-out-of-layouts
- app-a/src/routes
- a
- b
- c
- app-b/src/routes/a/b/c
- 04-advanced-loading
- 01-await-parent
- app-a/src/routes
- sum
- app-b/src/routes
- sum
- 02-using-both-load-functions
- app-a/src/routes
- app-b/src/routes
- 03-invalidation
- app-a/src/routes
- [...timezone]
- api/now
- app-b/src/routes/[...timezone]
- 04-custom-dependencies
- app-b/src/routes
- [...timezone]
- 05-invalidate-all
- app-b/src/routes
- [...timezone]
- 05-environment-variables
- 01-env-static-private
- app-a
- src/routes
- welcome
- app-b
- src/routes
- 02-env-dynamic-private
- app-b/src/routes
- 03-env-static-public
- app-a
- src/routes
- app-b
- src/routes
- 04-env-dynamic-public
- app-b/src/routes
- common
- src
- scripts/create-common-bundle
- src
- lib
- client/adapters/webcontainer
- components
- filetree
- icons
- server
- types
- routes
- backend
- tutorial.json
- tutorial/[slug]
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
277 files changed
+6395
-2082
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | | - | |
| 26 | + | |
29 | 27 | | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | 30 | | |
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | | - | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
0 commit comments
Comments
(0)