WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 5182dab

Browse files
committed
Update routing for 2024
1 parent 4a5dc08 commit 5182dab

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

nginx.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ http {
2727
location / {
2828
root /usr/share/nginx/html;
2929
index index.html index.htm;
30-
try_files $uri $uri/ /index.html;
30+
}
31+
32+
location /2024/ {
33+
alias /usr/share/nginx/html/;
34+
index index.html index.htm;
3135
}
3236
}
3337
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"dev": "vite dev",
66
"dev:host": "vite --host",
7-
"build": "vite build",
7+
"build": "vite build --base=/2024/",
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",

svelte.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const config = {
1212
precompress: false,
1313
fallback: 'index.html',
1414
strict: false
15-
})
15+
}),
16+
paths: {base: '/2024'},
1617
},
1718
preprocess: [
1819
preprocess({

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { sveltekit } from '@sveltejs/kit/vite';
22
import type { UserConfig } from 'vite';
33

44
const config: UserConfig = {
5-
plugins: [sveltekit()]
5+
plugins: [sveltekit()],
6+
base: '/2024/',
67
};
78

89
export default config;

0 commit comments

Comments
 (0)