commit dc7704011da9a0f4cb231117a8679966d44a199b
parent bd7a459a9f7d7deb9c47e4ca707d3288d776ca3c
Author: Asher Morgan <59518073+ashermorgan@users.noreply.github.com>
Date: Sun, 11 Aug 2024 14:22:26 -0700
Implement VITE_API_DOMAIN variable
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.env b/.env
@@ -0,0 +1,2 @@
+# No specific domain by default
+VITE_API_DOMAIN=
diff --git a/index.html b/index.html
@@ -12,8 +12,8 @@
<meta property="og:title" content="Running Tools"/>
<meta property="og:description" content="A collection of tools for runners and their coaches that calculate splits, predict race times, convert units, and more"/>
<meta property="og:type" content="website"/>
- <meta property="og:url" content="https://ashermorgan.github.io/running-tools/"/>
- <meta property="og:image" content="https://ashermorgan.github.io/running-tools/img/icons/open-graph-1280x640.png"/>
+ <meta property="og:url" content="%VITE_API_DOMAIN%%BASE_URL%"/>
+ <meta property="og:image" content="%VITE_API_DOMAIN%%BASE_URL%img/icons/open-graph-1280x640.png"/>
<!-- Microsoft tags -->
<meta name="msapplication-square70x70logo" content="%BASE_URL%img/icons/mstile-icon-128x128.png">
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
@@ -5,7 +5,7 @@
# abort on errors
set -e
-BASE_URL=/running-tools/ npm run build
+VITE_API_DOMAIN=https://ashermorgan.github.io BASE_URL=/running-tools/ npm run build
cd dist