fix(seo): use canonical SITE_URL for robots and sitemap#4598
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Updates the sitemap to include Reviewed by Cursor Bugbot for commit b28df2e. Configure here. |
Greptile SummaryThis PR fixes a production SEO regression where
Confidence Score: 5/5Safe to merge — targeted swap of a dynamic URL resolver for a compile-time constant in two small, well-understood SEO route handlers, with a new regression test that locks the fix in place. Both changed route handlers are straightforward; the fix is a one-line import swap with no side effects on application logic. The new test in seo.test.ts correctly guards against reintroducing getBaseUrl in these files, and all three existing SEO assertions continue to cover them. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Next.js Build] -->|Before fix| B["getBaseUrl()\nreads NEXT_PUBLIC_APP_URL\nbaked at build time"]
B --> C["robots.txt / sitemap.xml\nemit http://localhost:3000"]
A -->|After fix| D["SITE_URL constant\n'https://www.sim.ai'"]
D --> E["robots.txt / sitemap.xml\nemit https://www.sim.ai"]
F["seo.test.ts"] -->|SEO_DEFAULT_EXPORT_FILES| G["assert: robots.ts &\nsitemap.ts do NOT\nimport getBaseUrl"]
F -->|SEO_SCAN_INDIVIDUAL_FILES| H["assert: no hardcoded\nhttps://sim.ai without www"]
Reviews (2): Last reviewed commit: "fix(seo): drop /templates from sitemap a..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b28df2e. Configure here.
Summary
http://localhost:3000URLs in production (NEXT_PUBLIC_APP_URLgot baked at build time with the wrong value)SITE_URL(https://www.sim.ai) — matches existingseo.test.tsconvention used by other SEO surfaces (rss.xml,sitemap-images.xml,changelog.xml)/contactand/templatespages to the sitemapType of Change
Testing
Tested manually
Checklist