Added redirects
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user