From 4a776d6a4b24bedff99c284a6f3bbfa011899975 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 16 Oct 2024 07:30:39 +0000 Subject: [PATCH] Added redirects --- src/components/Head.astro | 10 +++++++++- src/content/config.ts | 10 +++++++++- src/content/redirects/facebook/index.md | 4 ++++ src/content/redirects/github/index.md | 4 ++++ src/content/redirects/instagram/index.md | 4 ++++ src/layouts/PageLayout.astro | 5 +++-- src/pages/go/[...slug].astro | 23 +++++++++++++++++++++++ src/pages/go/index.astro | 9 +++++++++ 8 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 src/content/redirects/facebook/index.md create mode 100644 src/content/redirects/github/index.md create mode 100644 src/content/redirects/instagram/index.md create mode 100644 src/pages/go/[...slug].astro create mode 100644 src/pages/go/index.astro diff --git a/src/components/Head.astro b/src/components/Head.astro index 3a49d54..134c8e1 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -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; --- @@ -57,6 +58,13 @@ const { title, description, image = "/nano.png" } = Astro.props; +{redirect ? ( + +) : null} +