Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jan 18, 2023
1 parent f17a42d commit e782c12
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions documentation/docs/25-build-and-deploy/50-adapter-static.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export default {
...and add the [`prerender`](/docs/page-options#prerender) option to your root layout:

```js
// src/routes/+layout.js

/// file: src/routes/+layout.js
// This can be false if you're using a fallback (i.e. SPA mode)
export const prerender = true;
```
Expand All @@ -50,6 +49,7 @@ Some platforms have zero-config support (more to come in future):
On these platforms, you should omit the adapter options so that `adapter-static` can provide the optimal configuration:

```diff
/// file: svelte.config.js
export default {
kit: {
- adapter: adapter({...}),
Expand Down Expand Up @@ -105,7 +105,7 @@ export default {
```

```js
// src/routes/+layout.js
/// file: src/routes/+layout.js
export const ssr = false;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function POST({ request, platform }) {
To make these types available to your app, reference them in your `src/app.d.ts`:

```diff
/// file: src/app.d.ts
declare namespace App {
interface Platform {
+ env?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
This adapter expects to find a [wrangler.toml](https://developers.cloudflare.com/workers/platform/sites/configuration) file in the project root. It should look something like this:

```toml
/// file: wrangler.toml
name = "<your-service-name>"
account_id = "<your-account-id>"

Expand Down Expand Up @@ -92,6 +93,7 @@ export async function POST({ request, platform }) {
To make these types available to your app, reference them in your `src/app.d.ts`:

```diff
/// file: src/app.d.ts
declare namespace App {
interface Platform {
+ env?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function load() {
```

```svelte
<!-- +layout.svelte -->
/// file: +layout.svelte
<script>
/** @type {import('./$types').LayoutServerData} */
export let data;
Expand Down

0 comments on commit e782c12

Please sign in to comment.