From e9b65e34231d9f74ef2849757d1feff79287b902 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 12 May 2024 15:16:58 +0100 Subject: [PATCH 1/3] this is not the colour picker --- website/agb/src/app/showcase/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/agb/src/app/showcase/page.tsx b/website/agb/src/app/showcase/page.tsx index 2b33411c..6817b8f5 100644 --- a/website/agb/src/app/showcase/page.tsx +++ b/website/agb/src/app/showcase/page.tsx @@ -8,7 +8,7 @@ export const metadata: Metadata = { title: "Showcase - agb", }; -export default function ColourPickerPage() { +export default function ShowcasePage() { return ( <> From 839ee3b6f7a19d58f5cd354957c746bcb32a2a51 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 12 May 2024 15:27:48 +0100 Subject: [PATCH 2/3] setup redirect --- website/agb/src/app/tapir/dpl/page.tsx | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 website/agb/src/app/tapir/dpl/page.tsx diff --git a/website/agb/src/app/tapir/dpl/page.tsx b/website/agb/src/app/tapir/dpl/page.tsx new file mode 100644 index 00000000..eb136415 --- /dev/null +++ b/website/agb/src/app/tapir/dpl/page.tsx @@ -0,0 +1,29 @@ +import { ContentBlock } from "@/components/contentBlock"; +import { Metadata } from "next"; +import { redirect } from "next/navigation"; + +export const metadata: Metadata = { + title: "Dungeon Puzzler Redirect", +}; + +const REDIRECT_TO = "/showcase/the-dungeon-puzzler's-lament"; + +export default function DplRedirectPage() { + redirect(REDIRECT_TO); + + return ( + <> + +

This page is a redirect to the Dungeon Puzzler

+
+ +

+ You should be redirected automatically.{" "} + + If you were not redirected automatically click here. + +

+
+ + ); +} From 4f18f1bc6293d5f90e411c2cbc216b9eadf5bdf9 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sun, 12 May 2024 15:41:31 +0100 Subject: [PATCH 3/3] remove special characters in sluggification --- website/agb/src/app/tapir/dpl/page.tsx | 2 +- website/agb/src/sluggify.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/website/agb/src/app/tapir/dpl/page.tsx b/website/agb/src/app/tapir/dpl/page.tsx index eb136415..9109487e 100644 --- a/website/agb/src/app/tapir/dpl/page.tsx +++ b/website/agb/src/app/tapir/dpl/page.tsx @@ -6,7 +6,7 @@ export const metadata: Metadata = { title: "Dungeon Puzzler Redirect", }; -const REDIRECT_TO = "/showcase/the-dungeon-puzzler's-lament"; +const REDIRECT_TO = "/showcase/the-dungeon-puzzlers-lament"; export default function DplRedirectPage() { redirect(REDIRECT_TO); diff --git a/website/agb/src/sluggify.ts b/website/agb/src/sluggify.ts index b02353b9..aa94e3de 100644 --- a/website/agb/src/sluggify.ts +++ b/website/agb/src/sluggify.ts @@ -1,3 +1,7 @@ export function slugify(x: string) { - return x.toLowerCase().split(" ").join("-"); + return x + .toLowerCase() + .split(" ") + .join("-") + .replace(/[^a-zA-Z0-9\-]/, ""); }