Skip to content

Commit 7303abc

Browse files
committed
fix(website): fix vercel.json routing for multi-page site and static assets
1 parent 4a09d0a commit 7303abc

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

website/vercel.json

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,65 @@
22
"version": 2,
33
"builds": [
44
{
5-
"src": "index.html",
5+
"src": "**/*",
66
"use": "@vercel/static"
77
}
88
],
99
"routes": [
10+
{
11+
"src": "/css/(.*)",
12+
"dest": "/css/$1"
13+
},
14+
{
15+
"src": "/js/(.*)",
16+
"dest": "/js/$1"
17+
},
18+
{
19+
"src": "/assets/(.*)",
20+
"dest": "/assets/$1"
21+
},
22+
{
23+
"src": "/features.html",
24+
"dest": "/features.html"
25+
},
26+
{
27+
"src": "/platforms.html",
28+
"dest": "/platforms.html"
29+
},
30+
{
31+
"src": "/agents.html",
32+
"dest": "/agents.html"
33+
},
34+
{
35+
"src": "/install.html",
36+
"dest": "/install.html"
37+
},
1038
{
1139
"src": "/(.*)",
1240
"dest": "/index.html"
1341
}
1442
],
1543
"headers": [
44+
{
45+
"source": "/css/(.*)",
46+
"headers": [
47+
{ "key": "Content-Type", "value": "text/css; charset=utf-8" },
48+
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
49+
]
50+
},
51+
{
52+
"source": "/js/(.*)",
53+
"headers": [
54+
{ "key": "Content-Type", "value": "application/javascript; charset=utf-8" },
55+
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
56+
]
57+
},
58+
{
59+
"source": "/assets/(.*)",
60+
"headers": [
61+
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
62+
]
63+
},
1664
{
1765
"source": "/(.*)",
1866
"headers": [

0 commit comments

Comments
 (0)