-
Notifications
You must be signed in to change notification settings - Fork 24
feat: redirect various SDK and tutorial links to new paths #580
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR updates vercel.json to redirect numerous external tutorial and content paths to internal cow-protocol documentation pages. It standardizes redirect status codes to 301 and introduces additional mappings for governance, MEV, solvers, widgets, and SDKs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (6)
vercel.json (6)
40-44: Inconsistent redirect configuration:permanent: falsevsstatusCode: 301.This entry uses
permanent: falsewhile the surrounding entries and the majority of this PR usestatusCode: 301. The PR description mentions "standardizing redirect status codes to 301" — consider updating this entry for consistency.Suggested fix
{ "source": "/front-end/cow-protocol-custom-linking", "destination": "/cow-protocol/tutorials/cow-swap", - "permanent": false + "statusCode": 301 },
270-279: Remainingpermanent: falseentries are inconsistent with the PR goal.Lines 273-278 still use
permanent: falseinstead ofstatusCode: 301. Given this PR aims to standardize on 301 redirects, these should also be updated for consistency.Suggested fix
{ "source": "/overview/cow-hooks/cow-hooks-example", "destination": "/cow-protocol/concepts/order-types/cow-hooks", - "permanent": false + "statusCode": 301 }, { "source": "/overview/cow-hooks/cow-hooks-faq", "destination": "/cow-protocol/concepts/order-types/cow-hooks", - "permanent": false + "statusCode": 301 },
445-449: Anotherpermanent: falseentry to standardize.Suggested fix
{ "source": "/tutorials/how-to-place-erc-1271-smart-contract-orders/smart-orders", "destination": "https://learn.cow.fi/tutorial/create-pre-signed-order", - "permanent": false + "statusCode": 301 },
520-534: Multiplepermanent: falseentries remain.These entries at lines 523, 528, and 533 still use the legacy
permanent: falseformat.Suggested fix
{ "source": "/overview/cow-hooks/cow-hooks-example/conclusion", "destination": "https://learn.cow.fi/tutorial/getting-started-order", - "permanent": false + "statusCode": 301 }, { "source": "/overview/cow-hooks/cow-hooks-example/configuration", "destination": "https://learn.cow.fi/tutorial/getting-started-order", - "permanent": false + "statusCode": 301 }, { "source": "/overview/cow-hooks/cow-hooks-example/permit-swap-and-bridge-cow-hook", "destination": "https://learn.cow.fi/tutorial/getting-started-order", - "permanent": false + "statusCode": 301 },
720-728: Duplicate redirect entries for trailing slash variants.Lines 721-724 and 726-729 define separate redirects for
/cow-protocol/reference/sdks/app-dataand/cow-protocol/reference/sdks/app-data/(with trailing slash). Since"cleanUrls": trueis enabled at line 2, Vercel typically normalizes these. You may be able to consolidate to a single entry without the trailing slash.
1175-1183: Similar duplicate: trailing slash variant.Same situation as above with
/cow-protocol/tutorials/solversand/cow-protocol/tutorials/solvers/. Consider consolidating.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
vercel.json(21 hunks)
🔇 Additional comments (5)
vercel.json (5)
595-599: Good catch on malformed URL redirect.Redirecting
/,to/handles a common typo where a comma is accidentally appended to the root URL. This is a valid cleanup.
600-684: LGTM: Grant and governance redirects consolidated appropriately.The grant-related legacy paths (including Notion-style IDs like
52fc4674f2c64092975024d52015917a) are properly redirected to/governance/grants. This is a reasonable consolidation for 404 remediation.
730-924: App-data SDK TypeDoc paths consolidated correctly.Large set of versioned interface/namespace paths from the TypeDoc-generated SDK documentation are all redirected to the canonical
/cow-protocol/reference/core/intents/app-datapage. This aligns with the PR goal of consolidating legacy versioned paths.
965-1174: Cow-SDK TypeDoc paths consolidated correctly.Similar to the app-data redirects, these SDK class/enum/interface paths are appropriately redirected to the main SDK reference page.
1205-1218: The destination paths are correctly configured and all files exist in the repository. The folder structure at./docs/mevblocker/concepts/MEV/MEV Attacks/contains all three referenced files (sandwich-attacks.md, what-is-backrunning.md, what-is-frontrunning.md). The%20encoding in the redirect destinations is the standard and correct way to represent spaces in URL paths—it properly maps to the actual filesystem folder with literal spaces.
Description
Expand docs.cow.fi redirect coverage, consolidating legacy and versioned paths into canonical destinations and normalizing malformed URLs.
Changes
/,) and remove duplicate redirect entries