From b06d30c521c0a69654a3b3b155701bdb897ca178 Mon Sep 17 00:00:00 2001 From: Philipp Zeder Date: Wed, 30 Sep 2026 18:53:56 +0200 Subject: [PATCH 1/2] Add /slack redirect to Slack community invite The Slack invite URL is long and awkward to share. Add a /slack endpoint that redirects to it and point the footer link there, so the invite URL lives in one place. Use a 302 instead of a 301 because Slack invite links expire and get rotated; a cached permanent redirect would keep sending returning visitors to a dead invite. Exclude /slack from the language redirect in server.js and from Paraglide link localisation so it never becomes /de/slack. Co-Authored-By: Claude Opus 5.5 (1M context) --- server.js | 2 +- src/lib/components/FooterNavigation.svelte | 2 +- src/lib/i18n.ts | 2 +- src/routes/slack/+server.ts | 11 +++++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/routes/slack/+server.ts diff --git a/server.js b/server.js index 613433b..43589a7 100644 --- a/server.js +++ b/server.js @@ -5,7 +5,7 @@ import { availableLanguageTags, sourceLanguageTag } from './src/lib/paraglide/ru const host = process.env.HOST ?? '0.0.0.0'; const port = Number.parseInt(process.env.PORT ?? '3000', 10); -const excludedPaths = new Set(['/claude_skill', '/sitemap.xml', '/terms']); +const excludedPaths = new Set(['/claude_skill', '/sitemap.xml', '/slack', '/terms']); const server = createServer((request, response) => { const url = new URL(request.url ?? '/', 'http://localhost'); diff --git a/src/lib/components/FooterNavigation.svelte b/src/lib/components/FooterNavigation.svelte index 8f77779..a15d571 100644 --- a/src/lib/components/FooterNavigation.svelte +++ b/src/lib/components/FooterNavigation.svelte @@ -23,7 +23,7 @@ text: m.footer_documentation(), }, { - href: 'https://join.slack.com/t/deploiocommunity/shared_invite/zt-20tb3k93m-O4NEUs0RjZYGQNQoih8zkA', + href: '/slack', text: m.footer_slack(), }, { diff --git a/src/lib/i18n.ts b/src/lib/i18n.ts index cecee12..b6da034 100644 --- a/src/lib/i18n.ts +++ b/src/lib/i18n.ts @@ -6,7 +6,7 @@ import { createI18n } from '@inlang/paraglide-sveltekit'; import { get } from 'svelte/store'; export const i18n = createI18n(runtime, { prefixDefaultLanguage: 'never', - exclude: ['/sitemap.xml'], + exclude: ['/sitemap.xml', '/slack'], }); export function switchToLanguage(newLanguage: AvailableLanguageTag) { diff --git a/src/routes/slack/+server.ts b/src/routes/slack/+server.ts new file mode 100644 index 0000000..d4c9551 --- /dev/null +++ b/src/routes/slack/+server.ts @@ -0,0 +1,11 @@ +import { redirect } from '@sveltejs/kit'; + +// Serve both `/slack` and `/slack/` from this endpoint so either variant +// redirects straight to the Slack community invite. Use a temporary redirect +// because Slack invite links expire and get rotated; a cached 301 would keep +// sending returning visitors to a dead invite. +export const trailingSlash = 'ignore'; + +export function GET() { + redirect(302, 'https://join.slack.com/t/deploiocommunity/shared_invite/zt-20tb3k93m-O4NEUs0RjZYGQNQoih8zkA'); +} From 1b99cc934325b788e6b5af61c60895253f198667 Mon Sep 17 00:00:00 2001 From: Philipp Zeder Date: Thu, 1 Oct 2026 11:20:34 +0200 Subject: [PATCH 2/2] Remove comment from /slack endpoint Co-Authored-By: Claude Opus 5.5 (1M context) --- src/routes/slack/+server.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/routes/slack/+server.ts b/src/routes/slack/+server.ts index d4c9551..f396ee8 100644 --- a/src/routes/slack/+server.ts +++ b/src/routes/slack/+server.ts @@ -1,9 +1,5 @@ import { redirect } from '@sveltejs/kit'; -// Serve both `/slack` and `/slack/` from this endpoint so either variant -// redirects straight to the Slack community invite. Use a temporary redirect -// because Slack invite links expire and get rotated; a cached 301 would keep -// sending returning visitors to a dead invite. export const trailingSlash = 'ignore'; export function GET() {