refactor: move discord and github redirects into next configs#2643
refactor: move discord and github redirects into next configs#2643chronark merged 5 commits intounkeyed:mainfrom
Conversation
Signed-off-by: Gökay Gürcan <github@gokaygurcan.com>
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@gokaygurcan is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes involve the removal of two files, Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
apps/www/next.config.js (1)
33-42: Consider adding status codes to redirects.Since these are permanent redirects to external URLs, it would be good practice to explicitly set the status code to 301.
{ source: "/discord", destination: "https://discord.gg/fDbezjbJbD", permanent: true, + statusCode: 301 }, { source: "/github", destination: "https://github.com/unkeyed/unkey", permanent: true, + statusCode: 301 }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
apps/www/app/discord/page.tsx(0 hunks)apps/www/app/github/page.tsx(0 hunks)apps/www/next.config.js(1 hunks)
💤 Files with no reviewable changes (2)
- apps/www/app/discord/page.tsx
- apps/www/app/github/page.tsx
Signed-off-by: Gökay Gürcan <github@gokaygurcan.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
apps/www/next.config.js (1)
34-71: LGTM! Well-structured redirects configurationThe implementation successfully:
- Moves Discord and GitHub redirects into next.config.js
- Ensures direct navigation without intermediate pages
- Maintains consistency with other redirects
Consider moving the destination URLs to environment variables for easier maintenance, especially for URLs that might change (like Discord invite links).
// Example implementation - destination: "https://discord.gg/fDbezjbJbD", + destination: process.env.DISCORD_INVITE_URL,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/www/next.config.js(1 hunks)
🔇 Additional comments (2)
apps/www/next.config.js (2)
26-33: LGTM! Clean rewrites configuration
The rewrites section is now focused solely on changelog routing, with no duplicate configurations for Discord or GitHub paths. This aligns with best practices for Next.js routing.
57-60: Verify Discord invite link permanence
The Discord invite link is set as a permanent redirect. Please confirm that this invite link is permanent and won't expire.
What does this PR do?
Moves social redirects (discord and github) into
next.config.jsfile.Fixes #2637
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
/discordto Discord and/githubto GitHub.