Skip to content

Commit 69261f8

Browse files
committed
[config] Set dynamic values for "site" within Astro Config
1 parent 8fd1273 commit 69261f8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

astro.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ const hasAlgoliaConfig = ALGOLIA_APP_ID && ALGOLIA_SEARCH_API_KEY && ALGOLIA_IND
1919

2020
// https://astro.build/config
2121
export default defineConfig({
22-
site: "https://aptos.dev",
22+
site:
23+
process.env.VERCEL_ENV === "production"
24+
? "https://aptos-docs-astro.vercel.app"
25+
: process.env.VERCEL_URL
26+
? `https://${process.env.VERCEL_URL}`
27+
: "http://localhost:4321",
2328
integrations: [
2429
starlight({
2530
title: "Aptos Developer Docs",

0 commit comments

Comments
 (0)