Skip to content

Commit d7bcee0

Browse files
committed
feat: le site se construit de manière statique
1 parent ff2a0e7 commit d7bcee0

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "vite dev",
7-
"build": "vite build",
7+
"build": "vite build && touch build/.nojekyll",
88
"preview": "vite preview",
99
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
1010
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
@@ -34,4 +34,4 @@
3434
"zod": "^3.23.8"
3535
},
3636
"type": "module"
37-
}
37+
}

src/routes/+layout.svelte

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<script>
22
import '../app.css';
33
4-
import '$lib/i18n';
5-
import { isLoading } from 'svelte-i18n';
6-
import { t } from 'svelte-i18n';
7-
import Flag from '$lib/components/Flag.svelte';
84
import pngIcon from '$lib/assets/coffee-icon.png';
5+
import Flag from '$lib/components/Flag.svelte';
6+
import '$lib/i18n';
7+
import { isLoading, t } from 'svelte-i18n';
98
</script>
109

1110
<svelte:head>
@@ -38,8 +37,6 @@
3837
<a href="/a-propos">{$t('a-propos')}</a>
3938
<span>-</span>
4039
<a href="/cv">{$t('cv')}</a>
41-
<span>-</span>
42-
<a href="https://jardin.cyberendroit.net/Articles/">Blog</a>
4340
<Flag />
4441
</nav>
4542
<main

svelte.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import adapter from '@sveltejs/adapter-node';
1+
import adapter from '@sveltejs/adapter-static';
22
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
33

44
/** @type {import('@sveltejs/kit').Config} */
@@ -11,7 +11,13 @@ const config = {
1111
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1212
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
1313
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
14-
adapter: adapter({ out: 'build' })
14+
adapter: adapter({
15+
pages: 'build',
16+
assets: 'build',
17+
fallback: null,
18+
precompress: false,
19+
strict: true
20+
})
1521
}
1622
};
1723

0 commit comments

Comments
 (0)