Skip to content

Commit 9724bc0

Browse files
author
Rich Harris
committed
tweaks
1 parent 81eb254 commit 9724bc0

File tree

4 files changed

+5
-3
lines changed
  • content/tutorial/04-advanced-sveltekit

4 files changed

+5
-3
lines changed

content/tutorial/04-advanced-sveltekit/04-advanced-loading/04-custom-dependencies/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Custom dependencies
3+
path: /Europe/London
34
---
45

56
Calling `fetch(url)` inside a `load` function registers `url` as a dependency. Sometimes it's not appropriate to use `fetch`, in which case you can specify a dependency manually with the [`depends(url)`](https://kit.svelte.dev/docs/load#invalidation-manual-invalidation) function.

content/tutorial/04-advanced-sveltekit/04-advanced-loading/05-invalidate-all/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: invalidateAll
3+
path: /Europe/London
34
---
45

56
Finally, there's the nuclear option — `invalidateAll()`. This will indiscriminately re-run all `load` functions for the current page, regardless of what they depend on.

content/tutorial/04-advanced-sveltekit/05-environment-variables/01-env-static-private/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ title: $env/static/private
55
Environment variables — like API keys and database credentials — can be added to a `.env` file, and they will be made available to your application.
66

77
> You can also use `.env.local` or `.env.[mode]` files — see the [Vite documentation](https://vitejs.dev/guide/env-and-mode.html#env-files) for more information). Make sure you add any files containing sensitive information to your `.gitignore` file!
8+
>
9+
> Environment variables in `process.env` are also available via `$env/static/private`.
810
911
In this exercise, we want to allow the user to enter the website if they know the correct passphrase, using an environment variable.
1012

@@ -49,8 +51,6 @@ export const actions = {
4951

5052
The website is now accessible to anyone who knows the correct passphrase.
5153

52-
> Environment variables in `process.env` are also available via `$env/static/private`.
53-
5454
## Keeping secrets
5555

5656
It's important that sensitive data doesn't accidentally end up being sent to the browser, where it could easily be stolen by hackers and scoundrels.

content/tutorial/04-advanced-sveltekit/05-environment-variables/01-env-static-private/app-a/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<form method="POST">
66
<label>
77
enter the passphrase
8-
<input name="passphrase" />
8+
<input name="passphrase" autocomplete="off" />
99
</label>
1010
</form>
1111

0 commit comments

Comments
 (0)