diff --git a/.gitignore b/.gitignore index 6a7a043..edd775a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ docs/screen_recording **/*.rs.bk feature_tests/.tmp *.log +/site/public +.vercel diff --git a/site/package.json b/site/package.json index fc32aaa..090f8b5 100644 --- a/site/package.json +++ b/site/package.json @@ -4,6 +4,9 @@ "main": "index.js", "author": "Gal Schlezinger", "license": "MIT", + "scripts": { + "build": "rm -rf public; mkdir public; cp ../.ci/install.sh ./public/install.txt" + }, "devDependencies": { "@vercel/node": "1.8.4", "typescript": "4.0.3", diff --git a/site/vercel.json b/site/vercel.json index 88376a0..26ea1fa 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,6 +1,19 @@ { "redirects": [ - { "source": "/", "destination": "https://github.com/Schniz/fnm" }, - { "source": "/install", "destination": "https://github.com/Schniz/fnm/raw/master/.ci/install.sh" } + { "source": "/", "destination": "https://github.com/Schniz/fnm" } + ], + "rewrites": [ + { "source": "/install", "destination": "/install.txt" } + ], + "headers": [ + { + "source": "/install", + "headers" : [ + { + "key" : "Cache-Control", + "value" : "public, max-age=3600" + } + ] + } ] }