Skip to content

Add /slack redirect to Slack community invite - #81

Open
zedpelin wants to merge 2 commits into
renuo:developfrom
zedpelin:add-slack-redirect
Open

zedpelin wants to merge 2 commits into
renuo:developfrom
zedpelin:add-slack-redirect

Conversation

@zedpelin

Copy link
Copy Markdown

The Slack community invite URL is long and awkward to share. This adds https://deplo.io/slack as a short link that redirects to it.

Changes

  • src/routes/slack/+server.ts: new endpoint, redirects /slack and /slack/ to the invite (same pattern as /terms)
  • src/lib/components/FooterNavigation.svelte: footer now links to /slack, so the invite URL lives in one place
  • server.js: /slack added to excludedPaths, so non-English browsers aren't bounced to /de/slack first
  • src/lib/i18n.ts: /slack added to Paraglide exclude, so the footer link isn't localised to /de/slack

Uses 302 rather than 301: Slack invite links expire and get rotated, and a cached permanent redirect would keep sending returning visitors to a dead invite.

Testing

Locally with npm run build && node server.js:

  • /slack and /slack/ return 302 to the invite, also with Accept-Language: de
  • Footer renders href="/slack" on localised pages

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@zedpelin
zedpelin requested a review from a team as a code owner September 30, 2026 16:55

@snitzelbread snitzelbread left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough, thanks!

Comment thread src/routes/slack/+server.ts Outdated
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants