We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0104c7d commit 78930beCopy full SHA for 78930be
src/components/BaseHead.astro
@@ -7,8 +7,9 @@ interface Props {
7
8
import { withBase } from "../lib/utils";
9
const { title, description = "The official blog of the Python core development team.", image } = Astro.props;
10
+const baseUrl = import.meta.env.DEV ? Astro.url.origin : Astro.site;
11
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
-const ogImage = image ? new URL(image, Astro.site) : new URL(withBase("/og-default.png"), Astro.site);
12
+const ogImage = image ? new URL(image, baseUrl) : new URL(withBase("/og-default.png"), baseUrl);
13
---
14
15
<meta charset="utf-8" />
0 commit comments