Skip to content

feat: improve minimal template #643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/rare-things-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'sv': patch
---

feat: improve minimal template

- move `favicon.svg` to `src/lib/assets` folder (to show inline/immutable assets)
- add `static/robots.txt` (to keep static folder)
- add `routes/+layout.svelte` (to show layout)
2 changes: 1 addition & 1 deletion packages/addons/vitest-addon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineAddon({

if (componentTesting) {
const fileName = kit
? `${kit.routesDirectory}/page.svelte.test.${ext}`
? `${kit.routesDirectory}/page.svelte.spec.${ext}`
: `src/App.svelte.test.${ext}`;

sv.file(fileName, (content) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create/templates/demo/static/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
# allow crawling everything by default
User-agent: *
Disallow:
1 change: 0 additions & 1 deletion packages/create/templates/minimal/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
Expand Down
11 changes: 11 additions & 0 deletions packages/create/templates/minimal/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts">
import favicon from '$lib/assets/favicon.svg';

let { children } = $props();
</script>

<svelte:head>
<link rel="icon" href={favicon} />
</svelte:head>

{@render children?.()}
3 changes: 3 additions & 0 deletions packages/create/templates/minimal/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# allow crawling everything by default
User-agent: *
Disallow:
Loading