diff --git a/apps/svelte.dev/content/blog/2020-07-17-svelte-and-typescript.md b/apps/svelte.dev/content/blog/2020-07-17-svelte-and-typescript.md
index a6e07242ec..580507114f 100644
--- a/apps/svelte.dev/content/blog/2020-07-17-svelte-and-typescript.md
+++ b/apps/svelte.dev/content/blog/2020-07-17-svelte-and-typescript.md
@@ -66,18 +66,18 @@ You first need to set up [`svelte-preprocess`](https://github.com/sveltejs/svelt
In a Rollup project, that would look like this — note that we also need to install `@rollup/plugin-typescript` so that Rollup can handle `.ts` files:
-```diff
-+ import autoPreprocess from 'svelte-preprocess';
-+ import typescript from '@rollup/plugin-typescript';
+```js
++++import autoPreprocess from 'svelte-preprocess';
+import typescript from '@rollup/plugin-typescript';+++
export default {
- ...,
- plugins: [
- svelte({
-+ preprocess: autoPreprocess()
- }),
-+ typescript({ sourceMap: !production })
- ]
+ // ...,
+ plugins: [
+ svelte({
+ +++preprocess: autoPreprocess()+++
+ }),
+ +++typescript({ sourceMap: !production })+++
+ ]
}
```
diff --git a/apps/svelte.dev/content/blog/2023-03-09-zero-config-type-safety.md b/apps/svelte.dev/content/blog/2023-03-09-zero-config-type-safety.md
index f7e53d122c..998b4a1cdb 100644
--- a/apps/svelte.dev/content/blog/2023-03-09-zero-config-type-safety.md
+++ b/apps/svelte.dev/content/blog/2023-03-09-zero-config-type-safety.md
@@ -28,7 +28,7 @@ const database = {
}
};
// ---cut---
-// src/routes/blog/[slug]/+page.server.ts
+/// file: src/routes/blog/[slug]/+page.server.ts
import type { ServerLoadEvent } from '@sveltejs/kit';
export async function load(event: ServerLoadEvent) {
@@ -42,16 +42,16 @@ This works, but we can do better. Notice that we accidentally wrote `event.param
This is where our automatic type generation comes in. Every route directory has a hidden `$types.d.ts` file with route-specific types:
-```diff
-// src/routes/blog/[slug]/+page.server.ts
--import type { ServerLoadEvent } from '@sveltejs/kit';
-+import type { PageServerLoadEvent } from './$types';
+```js
+/// file: src/routes/blog/[slug]/+page.server.ts
+---import type { ServerLoadEvent } from '@sveltejs/kit';---
++++import type { PageServerLoadEvent } from './$types';+++
export async function load(event: PageServerLoadEvent) {
- return {
-- post: await database.getPost(event.params.post)
-+ post: await database.getPost(event.params.slug)
- };
+ return {
+ ---post: await database.getPost(event.params.post)---
+ +++post: await database.getPost(event.params.slug)+++
+ };
}
```
@@ -60,7 +60,7 @@ This reveals our typo, as it now errors on the `params.post` property access. Be
After we have loaded our data, we want to display it in our `+page.svelte`. The same type generation mechanism ensures that the type of `data` is correct:
```svelte
-
+/// file: src/routes/blog/[slug]/+page.svelte
```
diff --git a/apps/svelte.dev/content/blog/2023-08-31-view-transitions.md b/apps/svelte.dev/content/blog/2023-08-31-view-transitions.md
index 1d934dd1f4..6e1fc58a10 100644
--- a/apps/svelte.dev/content/blog/2023-08-31-view-transitions.md
+++ b/apps/svelte.dev/content/blog/2023-08-31-view-transitions.md
@@ -14,7 +14,7 @@ However, until now, you couldn’t easily use this API in a SvelteKit app, since
You can trigger a view transition by calling `document.startViewTransition` and passing a callback that updates the DOM somehow. For our purposes today, SvelteKit will update the DOM as the user navigates. Once the callback finishes, the browser will transition to the new page state — by default, it does a crossfade between the old and the new states.
```js
-// @errors: 2339
+// @errors: 2339 2304
const domUpdate = async () => {};
// ---cut---
document.startViewTransition(async () => {
@@ -162,7 +162,7 @@ Now, the header will not transition in and out on navigation, but the rest of th
> [!DETAILS] Fixing the types
> Since `startViewTransition` is not supported by all browsers, your IDE may not know that it exists. To make the errors go away and get the correct typings, add the following to your `app.d.ts`:
>
-> ```ts
+> ```dts
> declare global {
> // preserve any customizations you have here
> namespace App {
diff --git a/apps/svelte.dev/content/blog/2023-09-20-runes.md b/apps/svelte.dev/content/blog/2023-09-20-runes.md
index 09da6b024c..b4e719895d 100644
--- a/apps/svelte.dev/content/blog/2023-09-20-runes.md
+++ b/apps/svelte.dev/content/blog/2023-09-20-runes.md
@@ -54,11 +54,11 @@ Runes are symbols that influence the Svelte compiler. Whereas Svelte today uses
For example, to declare a piece of reactive state, we can use the `$state` rune:
-```diff
+```svelte
--