Skip to content

Commit

Permalink
docs: Update sveltekit.md with latest SvelteKit layout naming convent…
Browse files Browse the repository at this point in the history
…ion (#377)
  • Loading branch information
jerriclynsjohn committed Mar 6, 2023
1 parent 0c95e97 commit 9585767
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/sveltekit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ title: SvelteKit

SvelteKit does not offer any built in integrations, so we will add Partytown manually. Credit belongs to [monogram.io](https://monogram.io/blog/add-partytown-to-svelte) for this guide.

1. Add the Partytown script to `src/routes/__layout.svelte`
1. Add the Partytown script to `src/routes/+layout.svelte`
2. Copy the Partytown files to the local filesystem using the Vite plugin
3. Reverse-Proxying scripts
4. Then adding 3rd party scripts

## 1. Add the Partytown script to `src/routes/__layout.svelte`
## 1. Add the Partytown script to `src/routes/+layout.svelte`

Adapting from [the HTML integration guide](https://partytown.builder.io/html)

```svelte
// src/routes/__layout.svelte
// src/routes/+layout.svelte
<script>
import { onMount } from 'svelte'
Expand Down Expand Up @@ -75,7 +75,7 @@ export default config
This will vary depending on hosting platform. See [Partytown's recommended guides](https://partytown.builder.io/proxying-requests#reverse-proxy).

```svelte
// src/routes/__layout.svelte
// src/routes/+layout.svelte
<script>
partytown = {
Expand Down Expand Up @@ -122,7 +122,7 @@ const config = {
and

```svelte
// src/routes/__layout.svelte
// src/routes/+layout.svelte
<svelte:head>
<script>
Expand Down

1 comment on commit 9585767

@vercel
Copy link

@vercel vercel bot commented on 9585767 Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.