Skip to content

Commit 6abaa38

Browse files
jycouetbenmccann
andauthored
feat: improve minimal template (#643)
* fav * icon in page * with or without ts * add changeset * like this ? * of cours eit's simpler! * Update robots.txt with helpfull info Co-authored-by: Ben McCann <[email protected]> * add +layout.svelte * tweak changelog * vitest `spec.ts`, playwright `test.ts` * align robots.txt --------- Co-authored-by: Ben McCann <[email protected]>
1 parent a4a35e4 commit 6abaa38

File tree

7 files changed

+25
-3
lines changed

7 files changed

+25
-3
lines changed

.changeset/rare-things-lie.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'sv': patch
3+
---
4+
5+
feat: improve minimal template
6+
7+
- move `favicon.svg` to `src/lib/assets` folder (to show inline/immutable assets)
8+
- add `static/robots.txt` (to keep static folder)
9+
- add `routes/+layout.svelte` (to show layout)

packages/addons/vitest-addon/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default defineAddon({
6464

6565
if (componentTesting) {
6666
const fileName = kit
67-
? `${kit.routesDirectory}/page.svelte.test.${ext}`
67+
? `${kit.routesDirectory}/page.svelte.spec.${ext}`
6868
: `src/App.svelte.test.${ext}`;
6969

7070
sv.file(fileName, (content) => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# https://www.robotstxt.org/robotstxt.html
1+
# allow crawling everything by default
22
User-agent: *
33
Disallow:

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
65
<meta name="viewport" content="width=device-width, initial-scale=1" />
76
%sveltekit.head%
87
</head>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script lang="ts">
2+
import favicon from '$lib/assets/favicon.svg';
3+
4+
let { children } = $props();
5+
</script>
6+
7+
<svelte:head>
8+
<link rel="icon" href={favicon} />
9+
</svelte:head>
10+
11+
{@render children?.()}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# allow crawling everything by default
2+
User-agent: *
3+
Disallow:

0 commit comments

Comments
 (0)