From 837edb0059744be82e820f7f3189948015f57fb4 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 17:37:17 +0800 Subject: [PATCH 1/2] chore: vercel rewrites --- example/vercel.json | 3 ++- turbo.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/vercel.json b/example/vercel.json index 225d4890..9d97c599 100644 --- a/example/vercel.json +++ b/example/vercel.json @@ -2,5 +2,6 @@ "$schema": "https://openapi.vercel.sh/vercel.json", "installCommand": "pnpm install", "buildCommand": "pnpm turbo run generate", - "outputDirectory": ".contented/.preview/out/" + "outputDirectory": ".contented/.preview/out/", + "rewrites": [{ "source": "/", "destination": "/contented/about" }] } diff --git a/turbo.json b/turbo.json index ed08472d..f920c5cb 100644 --- a/turbo.json +++ b/turbo.json @@ -20,6 +20,7 @@ "dependsOn": ["^build"] }, "generate": { + "cache": false, "inputs": ["**/.md"], "dependsOn": ["build"] }, From 93e73fe2fccab9851e7eb9a55dd088f2d8b78207 Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Tue, 13 Feb 2024 17:41:37 +0800 Subject: [PATCH 2/2] add html rewrites --- example/vercel.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example/vercel.json b/example/vercel.json index 9d97c599..edd4aeb8 100644 --- a/example/vercel.json +++ b/example/vercel.json @@ -3,5 +3,11 @@ "installCommand": "pnpm install", "buildCommand": "pnpm turbo run generate", "outputDirectory": ".contented/.preview/out/", - "rewrites": [{ "source": "/", "destination": "/contented/about" }] + "rewrites": [ + { "source": "/", "destination": "/contented/about.html" }, + { + "source": "/:path*", + "destination": "/:path*.html" + } + ] }