-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/next-sitemap #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // canonical λ° μΈμ΄λ³ hreflang | ||
| alternates: { | ||
| canonical: "/", // => https://myplanmate.vercel.app/ | ||
| languages: { | ||
| ko: "/ko", // => https://myplanmate.vercel.app/ko | ||
| en: "/en", // => https://myplanmate.vercel.app/en | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hreflang links to non-existent /ko and /en routes
Layout metadata advertises alternate language URLs (/ko and /en), but the project has no corresponding locale directories or i18n routing. Every rendered page will emit <link rel="alternate" hreflang> elements that lead to 404s, which search engines treat as errors and can harm canonicalization. Remove these alternates or implement the localized routes before exposing them.
Useful? React with πΒ / π.
| const RAW_SITE_URL = process.env.SITE_URL ?? "https://myplanmate.vercel.app"; | ||
| const siteUrl = RAW_SITE_URL.replace(/\/+$/, ""); // λ μ¬λμ μ κ±° | ||
|
|
||
| // "/" μ΄μΈ κ²½λ‘μ λ μ¬λμ μ κ±° | ||
| const strip = (p) => (p !== "/" && p.endsWith("/") ? p.slice(0, -1) : p); | ||
|
|
||
| const config = { | ||
| siteUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sitemap uses SITE_URL only and ignores NEXT_PUBLIC_SITE_URL
The sitemap configuration reads process.env.SITE_URL exclusively. Other modules (e.g. src/seo/constants.ts) still support NEXT_PUBLIC_SITE_URL, which was the only variable required before this commit. Environments that set only the public variable will now fall back to the hardcoded https://myplanmate.vercel.app, producing sitemaps and robots.txt pointing at the wrong domain. Consider checking both env names to keep generated URLs consistent with the rest of the app.
Useful? React with πΒ / π.
π Pull Request
π PR μ ν
π λ³κ²½ μ¬ν
next-sitemap μΈν
πΈ μ€ν¬λ¦°μ·
π§ κ΄λ ¨ μ΄μ
π οΈ μ΅μ’ λ°°ν¬ μ κ² λ¦¬μ€νΈ
β μ΅μ’ λ°°ν¬ μ κ² κ²°κ³Ό