From f9914b2958c85666346f16fefe6fd872f44d0e2f Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Wed, 4 Dec 2024 14:29:36 +0100 Subject: [PATCH] feat: github redirect --- src/lib/components/navigation/navigation.svelte | 5 +---- vite_server.ts | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/components/navigation/navigation.svelte b/src/lib/components/navigation/navigation.svelte index a2e8622..a7c5638 100644 --- a/src/lib/components/navigation/navigation.svelte +++ b/src/lib/components/navigation/navigation.svelte @@ -139,10 +139,7 @@ -
diff --git a/vite_server.ts b/vite_server.ts index e4c3f44..774dfab 100644 --- a/vite_server.ts +++ b/vite_server.ts @@ -3,6 +3,11 @@ import { serveDir } from 'https://deno.land/std@0.190.0/http/file_server.ts'; serve(async (req) => { const url = new URL(req.url); + + if (url.pathname.includes('github')) { + return Response.redirect('https://github.com/classroomio/naija-stars', 302); + } + let isIndex = url.pathname === '/' || url.pathname === '/index.html'; let res = await serveDir(req, {