Skip to content

Commit 2fa846c

Browse files
kt3ks-petey
authored andcommitted
fix title area, fix syntax highlight (using html syntax)
1 parent 5113870 commit 2fa846c

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

examples/tutorials/sveltekit.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Building a SvelteKit app with sv and Deno
1+
---
2+
title: "Building a SvelteKit app with sv and Deno"
3+
url: /examples/sveltekit_tutorial/
4+
---
25

36
SvelteKit has been a stable popular vote since its launch and with Svelte
47
version 5 releasing recently, as of time of writing, there isn't a better time
@@ -124,16 +127,16 @@ All we are doing here is converting our map to an array so we can see them
124127
rendered on the `+page.svelte`. Within this page you can remove anything you'd
125128
like or just add the following.
126129

127-
```svelte
130+
```html
128131
<script lang="ts">
129-
/// src/routes/+page.svelte
130-
let { data } = $props();
132+
/// src/routes/+page.svelte
133+
let { data } = $props();
131134
</script>
132135

133136
<section class="mb-4 grid max-h-96 grid-cols-2 gap-4 overflow-y-auto">
134-
{#each data.dinos as item}
135-
<a class="rounded border p-4" href="/{item.name}">{item.name}</a>
136-
{/each}
137+
{#each data.dinos as item}
138+
<a class="rounded border p-4" href="/{item.name}">{item.name}</a>
139+
{/each}
137140
</section>
138141
```
139142

@@ -186,9 +189,9 @@ src/routes/+error.svelte
186189
This is a very simple page, feel free to spruce up the styles here or add your
187190
own flair!
188191

189-
```svelte
192+
```html
190193
<script lang="ts">
191-
import { page } from '$app/state';
194+
import { page } from "$app/state";
192195
</script>
193196

194197
<h1>{page.status}: {page.error?.message}</h1>
@@ -201,10 +204,10 @@ attached to the error.
201204
Now with that pesky error distraction handled, pun intended, we can get back to
202205
showing our individual dinosaur!
203206

204-
```svelte
207+
```html
205208
<script lang="ts">
206-
/// src/routes/[name]/+page.svelte
207-
let { data } = $props();
209+
/// src/routes/[name]/+page.svelte
210+
let { data } = $props();
208211
</script>
209212

210213
<h1>{data.name}</h1>
@@ -231,28 +234,28 @@ Here are a few things we want to achieve:
231234
2. Show the awesome docs for Deno and SvelteKit
232235
3. Show a cute Dino on the page!
233236

234-
```svelte
237+
```html
235238
<script lang="ts">
236-
import '../app.css';
237-
let { children } = $props();
239+
import "../app.css";
240+
let { children } = $props();
238241
</script>
239242

240243
<header class="flex flex-row place-content-between items-center p-4">
241-
<h1 class="text-2xl"><a href="/">Deno Sveltekit</a></h1>
242-
<img id="deno" class="w-32" src="/vite-deno.svg" alt="Vite with Deno" />
244+
<h1 class="text-2xl"><a href="/">Deno Sveltekit</a></h1>
245+
<img id="deno" class="w-32" src="/vite-deno.svg" alt="Vite with Deno" />
243246
</header>
244247

245248
<main class="container mx-auto p-4">
246-
{@render children()}
249+
{@render children()}
247250
</main>
248251

249252
<footer class="my-4 flex flex-row justify-center gap-4">
250-
<p class="font-bold">
251-
<a href="https://svelte.dev/docs/kit">Sveltekit docs</a>
252-
</p>
253-
<p class="font-bold">
254-
<a href="https://docs.deno.com/">Deno docs</a>
255-
</p>
253+
<p class="font-bold">
254+
<a href="https://svelte.dev/docs/kit">Sveltekit docs</a>
255+
</p>
256+
<p class="font-bold">
257+
<a href="https://docs.deno.com/">Deno docs</a>
258+
</p>
256259
</footer>
257260
```
258261

@@ -343,7 +346,7 @@ export const load = async ({ url }) => {
343346
Wuuf, that was a lot of work, and with it out of the way lets get some
344347
pagination and search inputs added to the UI!
345348

346-
```svelte
349+
```html
347350
<script lang="ts">
348351
import { goto, invalidate, replaceState } from '$app/navigation';
349352
import { page as sveltePage } from '$app/state';

0 commit comments

Comments
 (0)