Added redirects

This commit is contained in:
Michael
2024-10-16 07:30:39 +00:00
parent bf91b37f81
commit 4a776d6a4b
8 changed files with 65 additions and 4 deletions
+9 -1
View File
@@ -14,11 +14,12 @@ interface Props {
title: string;
description: string;
image?: string;
redirect?: string;
}
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = "/nano.png" } = Astro.props;
const { title, description, image = "/nano.png", redirect } = Astro.props;
---
<!-- Global Metadata -->
@@ -57,6 +58,13 @@ const { title, description, image = "/nano.png" } = Astro.props;
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
{redirect ? (
<meta
http-equiv="refresh"
content={ `0; url=${ redirect }` }
/>
) : null}
<ViewTransitions />
<script>