From 0693420af6168e3c518f34746b30b16456cf4b4f Mon Sep 17 00:00:00 2001 From: Tee Ming Chew Date: Thu, 16 Jul 2026 05:39:20 +0800 Subject: [PATCH] fix --- documentation/docs/20-core-concepts/10-routing.md | 2 +- documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md | 2 +- .../docs/25-build-and-deploy/70-adapter-cloudflare-workers.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/docs/20-core-concepts/10-routing.md b/documentation/docs/20-core-concepts/10-routing.md index af646d056ce8..517a8b326b17 100644 --- a/documentation/docs/20-core-concepts/10-routing.md +++ b/documentation/docs/20-core-concepts/10-routing.md @@ -107,7 +107,7 @@ You can find more information about these in [page options](page-options). ### +page.server.js -If your `load` function can only run on the server — for example, if it needs to fetch data from a database or you need to access private [environment variables]($env-static-private) like API keys — then you can rename `+page.js` to `+page.server.js` and change the `PageLoad` type to `PageServerLoad`. +If your `load` function can only run on the server — for example, if it needs to fetch data from a database or you need to access private [environment variables](environment-variables) like API keys — then you can rename `+page.js` to `+page.server.js` and change the `PageLoad` type to `PageServerLoad`. ```js /// file: src/routes/blog/[slug]/+page.server.js diff --git a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md index 5003c5710e7f..ab8864e97c7f 100644 --- a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md +++ b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md @@ -155,7 +155,7 @@ export async function POST({ request, platform }) { } ``` -> [!NOTE] SvelteKit's built-in [`$env` module]($env-static-private) should be preferred for environment variables. +> [!NOTE] SvelteKit's built-in [`$app/env/*` modules](environment-variables) should be preferred for environment variables. To make these types available to your app, install [`@cloudflare/workers-types`](https://www.npmjs.com/package/@cloudflare/workers-types) and reference them in your `src/app.d.ts`: diff --git a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md index 418a7e198adf..7b387c00b202 100644 --- a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md +++ b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md @@ -105,7 +105,7 @@ export async function POST({ request, platform }) { } ``` -> [!NOTE] SvelteKit's built-in [`$env` module]($env-static-private) should be preferred for environment variables. +> [!NOTE] SvelteKit's built-in [`$app/env/*` modules](environment-variables) should be preferred for environment variables. To make these types available to your app, install [`@cloudflare/workers-types`](https://www.npmjs.com/package/@cloudflare/workers-types) and reference them in your `src/app.d.ts`: