Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions apps/svelte.dev/content/docs/kit/98-reference/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ generateManifest(opts: { relativePath: string; routes?: RouteDefinition[] }): st

</div>

Generate a server-side manifest to initialise the SvelteKit [server](/docs/kit/@sveltejs-kit#Server) with.
Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with.

</div>
</div>
Expand Down Expand Up @@ -1226,10 +1226,10 @@ fetch: typeof fetch;
- It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
- It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
- Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](/docs/kit/hooks#Server-hooks-handle)
- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle)
- During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.

You can learn more about making credentialed requests with cookies [here](/docs/kit/load#Cookies)
You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies)

</div>
</div>
Expand Down Expand Up @@ -1275,7 +1275,7 @@ export async function load({ fetch, setHeaders }) {

Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once.

You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead.
You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead.

`setHeaders` has no effect when a `load` function runs in the browser.

Expand Down Expand Up @@ -1306,7 +1306,7 @@ depends(...deps: Array<`${string}:${string}`>): void;

<div class="ts-block-property-details">

This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.

Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.

Expand Down Expand Up @@ -1784,7 +1784,7 @@ state: App.PageState;

<div class="ts-block-property-details">

The page state, which can be manipulated using the [`pushState`](/docs/kit/$app-navigation#pushState) and [`replaceState`](/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`.
The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`.

</div>
</div>
Expand All @@ -1797,7 +1797,7 @@ form: any;

<div class="ts-block-property-details">

Filled only after a form submission. See [form actions](/docs/kit/form-actions) for more info.
Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info.

</div>
</div></div>
Expand Down Expand Up @@ -1899,10 +1899,10 @@ fetch: typeof fetch;
- It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
- It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
- Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](/docs/kit/hooks#Server-hooks-handle)
- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle)
- During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.

You can learn more about making credentialed requests with cookies [here](/docs/kit/load#Cookies)
You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies)

</div>
</div>
Expand All @@ -1928,7 +1928,7 @@ locals: App.Locals;

<div class="ts-block-property-details">

Contains custom data that was added to the request within the [`server handle hook`](/docs/kit/hooks#Server-hooks-handle).
Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle).

</div>
</div>
Expand Down Expand Up @@ -2026,7 +2026,7 @@ export async function load({ fetch, setHeaders }) {

Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once.

You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](/docs/kit/@sveltejs-kit#Cookies) API instead.
You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead.

</div>
</div>
Expand Down Expand Up @@ -2486,7 +2486,7 @@ depends(...deps: string[]): void;

<div class="ts-block-property-details">

This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.

Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.

Expand Down Expand Up @@ -3072,7 +3072,7 @@ sandbox?: Array<

<div class="ts-block-property-bullets">

- <span class="tag deprecated">deprecated</span>
- <span class="tag deprecated">deprecated</span>

</div>

Expand All @@ -3089,7 +3089,7 @@ sandbox?: Array<

<div class="ts-block-property-bullets">

- <span class="tag deprecated">deprecated</span>
- <span class="tag deprecated">deprecated</span>

</div>

Expand All @@ -3106,7 +3106,7 @@ sandbox?: Array<

<div class="ts-block-property-bullets">

- <span class="tag deprecated">deprecated</span>
- <span class="tag deprecated">deprecated</span>

</div>

Expand All @@ -3133,7 +3133,7 @@ referrer?: Array<

<div class="ts-block-property-bullets">

- <span class="tag deprecated">deprecated</span>
- <span class="tag deprecated">deprecated</span>

</div>

Expand Down
32 changes: 16 additions & 16 deletions apps/svelte.dev/content/docs/kit/98-reference/50-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ compilerOptions?: CompileOptions;

</div>

Options passed to [`svelte.compile`](/docs/svelte/svelte-compiler#CompileOptions).
Options passed to [`svelte.compile`](https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions).

</div>
</div>
Expand Down Expand Up @@ -139,7 +139,7 @@ The `kit` property configures SvelteKit, and can have the following properties:

</div>

Your [adapter](/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms.
Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms.

<div class="ts-block-property-children">

Expand Down Expand Up @@ -247,9 +247,9 @@ When pages are prerendered, the CSP header is added via a `<meta http-equiv>` ta

> [!NOTE] When `mode` is `'auto'`, SvelteKit will use nonces for dynamically rendered pages and hashes for prerendered pages. Using nonces with prerendered pages is insecure and therefore forbidden.
> [!NOTE] Note that most [Svelte transitions](/tutorial/svelte/transition) work by creating an inline `<style>` element. If you use these in your app, you must either leave the `style-src` directive unspecified or add `unsafe-inline`.
> [!NOTE] Note that most [Svelte transitions](https://svelte.dev/tutorial/svelte/transition) work by creating an inline `<style>` element. If you use these in your app, you must either leave the `style-src` directive unspecified or add `unsafe-inline`.
If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](/docs/kit/hooks#Server-hooks-handle) to roll your own CSP.
If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) to roll your own CSP.

<div class="ts-block-property-children">

Expand Down Expand Up @@ -394,7 +394,7 @@ publicPrefix?: string;

</div>

A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](/docs/kit/$env-static-public) and [`$env/dynamic/public`](/docs/kit/$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.
A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) and [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.

</div>
</div>
Expand All @@ -414,7 +414,7 @@ privatePrefix?: string;

</div>

A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](/docs/kit/$env-static-private) and [`$env/dynamic/private`](/docs/kit/$env-dynamic-private).
A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) and [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private).

</div>
</div>
Expand Down Expand Up @@ -476,7 +476,7 @@ client?: string;

</div>

The location of your client [hooks](/docs/kit/hooks).
The location of your client [hooks](https://svelte.dev/docs/kit/hooks).

</div>
</div>
Expand All @@ -495,7 +495,7 @@ server?: string;

</div>

The location of your server [hooks](/docs/kit/hooks).
The location of your server [hooks](https://svelte.dev/docs/kit/hooks).

</div>
</div>
Expand All @@ -515,7 +515,7 @@ universal?: string;

</div>

The location of your universal [hooks](/docs/kit/hooks).
The location of your universal [hooks](https://svelte.dev/docs/kit/hooks).

</div>
</div></div>
Expand Down Expand Up @@ -556,7 +556,7 @@ params?: string;

</div>

a directory containing [parameter matchers](/docs/kit/advanced-routing#Matching)
a directory containing [parameter matchers](https://svelte.dev/docs/kit/advanced-routing#Matching)

</div>
</div>
Expand All @@ -575,7 +575,7 @@ routes?: string;

</div>

the files that define the structure of your app (see [Routing](/docs/kit/routing))
the files that define the structure of your app (see [Routing](https://svelte.dev/docs/kit/routing))

</div>
</div>
Expand All @@ -594,7 +594,7 @@ serviceWorker?: string;

</div>

the location of your service worker's entry point (see [Service workers](/docs/kit/service-workers))
the location of your service worker's entry point (see [Service workers](https://svelte.dev/docs/kit/service-workers))

</div>
</div>
Expand Down Expand Up @@ -798,7 +798,7 @@ base?: '' | `/${string}`;

</div>

A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](/docs/kit/$app-paths#base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.
A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://svelte.dev/docs/kit/$app-paths#base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.

</div>
</div>
Expand All @@ -823,7 +823,7 @@ Whether to use relative asset paths.
If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML.
If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL

[Single-page app](/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting.
[Single-page app](https://svelte.dev/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting.

If your app uses a `<base>` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `<base>` URL rather than the current page.

Expand All @@ -842,7 +842,7 @@ In 1.0, `undefined` was a valid value, which was set by default. In that case, i

</div>

See [Prerendering](/docs/kit/page-options#prerender).
See [Prerendering](https://svelte.dev/docs/kit/page-options#prerender).

<div class="ts-block-property-children">

Expand Down Expand Up @@ -1174,7 +1174,7 @@ Not all navigations will result in an error though, for example if the JavaScrip
</script>
```
If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](/docs/kit/$app-state#updated) `true` when it detects one.
If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) `true` when it detects one.
<div class="ts-block-property-children">
Expand Down
Loading