Skip to content

Commit

Permalink
feat: incorporate <svelte:html> into templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Dec 18, 2024
1 parent 3b9fbcd commit 9be2d95
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-roses-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/create': minor
---

feat: incorporate `<svelte:html>` into templates
2 changes: 1 addition & 1 deletion packages/create/templates/demo/src/app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html %svelte.htmlAttributes%>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Expand Down
2 changes: 2 additions & 0 deletions packages/create/templates/demo/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
let { children } = $props();
</script>

<svelte:html lang="en" />

<div class="app">
<Header />

Expand Down
2 changes: 1 addition & 1 deletion packages/create/templates/library/src/app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html %svelte.htmlAttributes%>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Expand Down
8 changes: 8 additions & 0 deletions packages/create/templates/library/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
/** @type {{children: import('svelte').Snippet}} */
let { children } = $props();
</script>

<svelte:html lang="en" />

{@render children()}
2 changes: 1 addition & 1 deletion packages/create/templates/minimal/src/app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html %svelte.htmlAttributes%>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
Expand Down
8 changes: 8 additions & 0 deletions packages/create/templates/minimal/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
/** @type {{children: import('svelte').Snippet}} */
let { children } = $props();
</script>

<svelte:html lang="en" />

{@render children()}

0 comments on commit 9be2d95

Please sign in to comment.