Skip to content

Commit 9be2d95

Browse files
committed
feat: incorporate <svelte:html> into templates
Related to sveltejs/kit#13065
1 parent 3b9fbcd commit 9be2d95

File tree

7 files changed

+26
-3
lines changed

7 files changed

+26
-3
lines changed

.changeset/forty-roses-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/create': minor
3+
---
4+
5+
feat: incorporate `<svelte:html>` into templates

packages/create/templates/demo/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html %svelte.htmlAttributes%>
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />

packages/create/templates/demo/src/routes/+layout.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
let { children } = $props();
77
</script>
88

9+
<svelte:html lang="en" />
10+
911
<div class="app">
1012
<Header />
1113

packages/create/templates/library/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html %svelte.htmlAttributes%>
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script>
2+
/** @type {{children: import('svelte').Snippet}} */
3+
let { children } = $props();
4+
</script>
5+
6+
<svelte:html lang="en" />
7+
8+
{@render children()}

packages/create/templates/minimal/src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html %svelte.htmlAttributes%>
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script>
2+
/** @type {{children: import('svelte').Snippet}} */
3+
let { children } = $props();
4+
</script>
5+
6+
<svelte:html lang="en" />
7+
8+
{@render children()}

0 commit comments

Comments
 (0)