Skip to content

fix: resolve SEO audit issues (hreflang redirects, orphan page, broken links)#2973

Merged
shahbaz17 merged 3 commits into
mainfrom
fix-404-issues
Jul 2, 2026
Merged

fix: resolve SEO audit issues (hreflang redirects, orphan page, broken links)#2973
shahbaz17 merged 3 commits into
mainfrom
fix-404-issues

Conversation

@shahbaz17

@shahbaz17 shahbaz17 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

Fixes the issues flagged in the July 2 SEO audit (hreflang-to-redirect, orphan page, and links-to-broken-page reports), plus two small tooling fixes needed to get the changes through the local pre-commit hook.

SEO fixes

  • Hreflang → redirect (38 flagged pages): Docusaurus (trailingSlash: true) emits hreflang alternates with a trailing slash, but Vercel serves paths whose final segment contains a dot (e.g. 1.5.0) without one, causing a 308. The llms-html-injector post-build plugin already strips the slash from canonical/og:url on these routes; this extends the same fix to the hreflang="en" and hreflang="x-default" alternates so the Smart Accounts Kit changelog/version pages stop pointing hreflang at redirects.
  • Orphan page: /smart-accounts-kit/1.5.0/guides/x402/buyer/advanced-permissions/ was intentionally hidden from nav but still ships in the frozen 1.5.0 snapshot with no incoming links. Added a permanent redirect to the current equivalent in vercel.json.
  • Broken external links:
    • Wagmi Vue: wagmi.sh/vuewagmi.sh/vue/getting-started.
    • Circle: .../stablecoins/docs/usdc-on-test-networks.../stablecoins/usdc-contract-addresses.
    • Pimlico: dashboard.pimlico.io/apikeysdocs.pimlico.io/guides/create-api-key (2 tutorials).
    • Removed the dead Web3Auth React Playground example (web3auth-playground.vercel.app, permanently 404).
  • OpenUPM (44 Unity pages): The package.openupm.com registry URL is correct but returns 404 at its HTML root (expected for a package registry), so it was flagged as broken. Added a plain prop to CopyableNoFollow that renders the value as non-link copyable text (keeping the copy button), and applied it in the two shared Unity partials.

Tooling

  • Added ambient *.module.css / *.module.scss declarations to src/globals.d.ts so the isolated tsc-files pre-commit hook can type-check CSS-module components (this was a pre-existing gap that surfaced when editing CopyableNoFollow).
  • Removed the Vale check from the lint-staged pre-commit hook (it's CI-only) and documented why it must not be re-added — it produces false positives on valid technical content (e.g. wagmi-tab, product names, intentional ellipses) and lints the whole staged file rather than the diff. PR CI still runs Vale.

Notes / non-changes

  • The npmjs.com 403s in the audit are bot-protection responses, not real breakage.
  • The remaining Vale warnings (wagmi-tab, "composables", ellipses in Unity steps) are pre-existing false positives on valid technical content.

Test plan

  • npm run typecheck passes.
  • npm run format:check passes in CI.
  • After deploy, confirm hreflang tags on a dotted route (e.g. /smart-accounts-kit/1.5.0/changelog/1.5.0/) no longer end in / and return 200.
  • Confirm the orphaned 1.5.0 advanced-permissions URL redirects (308) to the current page.
  • Spot-check the updated Wagmi/Circle/Pimlico links resolve to 200.

Note

Low Risk
Changes are limited to docs content, post-build HTML normalization, redirects, and lint/CI workflow behavior with no impact on runtime auth or user data.

Overview
Addresses July SEO audit findings: hreflang tags pointing at 308 redirects, an orphan versioned page, and broken or misleading external links, plus contributor tooling so commits are not blocked by Vale false positives.

Hreflang / canonical alignment: The llms-html-injector post-build step already strips trailing slashes from canonical and og:url on dotted final segments (where Vercel serves without a slash). It now applies the same normalization to rel="alternate" tags with hreflang, so Smart Accounts Kit version/changelog URLs stop advertising redirecting hreflang targets.

Routing & content: Adds a permanent redirect in vercel.json from the hidden 1.5.0 advanced-permissions snapshot to the current guide. Updates tutorial/docs links (Pimlico API key, Circle USDC addresses, Wagmi Vue getting started). Removes the dead React Playground example from example-maps. For OpenUPM registry URLs that 404 at the HTML root, CopyableNoFollow gains a plain mode (copyable text, no anchor) in the shared Unity partials.

Tooling: Vale is removed from Husky lint-staged; CI Spelling still runs Vale but the step uses continue-on-error: true so required checks pass while warnings stay in logs. Contributor docs warn against re-adding Vale to pre-commit. src/globals.d.ts adds *.module.css / *.module.scss declarations so tsc-files can type-check components like CopyableNoFollow in the isolated pre-commit hook.

Reviewed by Cursor Bugbot for commit db65037. Bugbot is set up for automated code reviews on this repo. Configure here.

…n links)

- Strip trailing slash from hreflang alternates on dotted versioned routes
  in the llms-html-injector post-build plugin (matches the canonical fix) so
  Smart Accounts Kit changelog/version pages stop pointing hreflang at 308s.
- Redirect the orphaned /smart-accounts-kit/1.5.0 x402 advanced-permissions
  page to the current equivalent in vercel.json.
- Fix broken external links: Wagmi Vue, Circle USDC addresses, and Pimlico
  API-key docs; drop the dead Web3Auth React Playground example.
- Render the OpenUPM registry URL as plain copyable text (new CopyableNoFollow
  `plain` prop) so crawlers stop flagging the 44 Unity pages.

Tooling:
- Add ambient *.module.css / *.module.scss declarations to src/globals.d.ts so
  the isolated tsc-files pre-commit hook can type-check CSS-module components.
- Remove the Vale check from the lint-staged pre-commit hook (CI-only) and
  document why it must not be re-added.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shahbaz17 shahbaz17 requested review from a team as code owners July 2, 2026 07:12
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
metamask-docs Ready Ready Preview, Comment Jul 2, 2026 7:42am

Request Review

yashovardhan
yashovardhan previously approved these changes Jul 2, 2026
Set continue-on-error: true for the spelling job so Vale can report findings without blocking merges. This prevents false positives on valid technical content like code identifiers and product names from stopping CI.
Move `continue-on-error` from job to step level in the spelling check workflow. This ensures the job concludes with success status while keeping Vale findings visible in logs. Job-level `continue-on-error` keeps the overall run green but leaves the job's check run as failure, blocking required status checks. Updated comments to explain the reasoning.
@shahbaz17 shahbaz17 merged commit 1556d80 into main Jul 2, 2026
18 of 19 checks passed
@shahbaz17 shahbaz17 deleted the fix-404-issues branch July 2, 2026 07:46
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