Skip to content

Commit 3b958ec

Browse files
chore: update cSpell words and configure dynamic site URL in astro.config.mts (#66)
1 parent f5778ea commit 3b958ec

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
"cSpell.words": [
2828
"Adammatthiesen",
2929
"astrojs",
30-
"codepaths",
3130
"automations",
31+
"codepaths",
3232
"describedby",
33+
"DOKPLOY",
3334
"ectwoslash",
3435
"esbuild",
3536
"Hippotastic",

docs/astro.config.mts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import starlight from "@astrojs/starlight";
22
import { defineConfig } from "astro/config";
33

4+
// Define the Site URL
5+
const site = process.env.DOKPLOY_DEPLOY_URL
6+
? `https://${process.env.DOKPLOY_DEPLOY_URL}`
7+
: "https://twoslash.studiocms.dev/";
8+
9+
const ogImageUrl = new URL("/og.png", site).href;
10+
411
// https://astro.build/config
512
export default defineConfig({
6-
site: "https://twoslash.studiocms.dev",
13+
site,
714
integrations: [
815
starlight({
916
title: "Expressive Code Twoslash",
@@ -121,7 +128,7 @@ export default defineConfig({
121128
tag: "meta",
122129
attrs: {
123130
property: "og:image",
124-
content: "https://twoslash.studiocms.dev/og-image.png",
131+
content: ogImageUrl,
125132
},
126133
},
127134

@@ -144,7 +151,7 @@ export default defineConfig({
144151
tag: "meta",
145152
attrs: {
146153
name: "twitter:image",
147-
content: "https://twoslash.studiocms.dev/og-image.png",
154+
content: ogImageUrl,
148155
},
149156
},
150157
],

0 commit comments

Comments
 (0)