sfnext-routing
Add and change pages in a Storefront Next project: flat-file routes in src/routes, layout routes (_app, _checkout, _empty), splat routes for product and category pages, action.* and resource.* routes, src/route-paths.ts (routes, resourceRoutes, routeHref), site-aware Link and useNavigate wrappers, SeoMeta and JsonLd head tags, multi-site /:siteId/:localeId URL prefixes, url.seoRoutes and excludeRoutes, extension routes, and the SLAS callback routes. Use for "add a page", "new route", "why is my link missing the site prefix", "route file naming", "redirect to login", or a 404 on a new URL. Do not use for loader/action/fetcher data code (use storefront-next:sfnext-data-fetching), shouldRevalidate (use storefront-next:sfnext-revalidation), SEO strategy such as sitemaps and canonical rules (use storefront-next:sfnext-seo), or Page Designer regions (use storefront-next:sfnext-page-designer).
Pinned to revision fe78868e0e70, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/sfnext-routing/SKILL.md
- skills/sfnext-routing/evals/trigger-evals.json
- skills/sfnext-routing/references/ROUTE-CONVENTIONS.md
- skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md
Every link opens the file at its source, pinned to the revision this page describes.