[READ-ONLY] Mirror of https://github.com/Schniz/next-static-paths. Statically prevent 404s in your Next.js applications using TypeScript github.com/schniz/next-static-paths
next nextjs static-analysis typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

TypeScript 99.7%
JavaScript 0.3%
28 2 6

Clone this repository

https://tangled.org/schlez.in/next-static-paths https://tangled.org/did:plc:raamruuhpyletile5k4qlfd3
git@tangled.org:schlez.in/next-static-paths git@tangled.org:did:plc:raamruuhpyletile5k4qlfd3

For self-hosted knots, clone URLs may differ based on your setup.



README.md

This feature is supported natively in Next.js 13.2#

upgrade and have fun!


next-static-paths#

Statically prevent HTTP 404 Not Found in your Next.js applications using TypeScript and code generation.

Features#

💻 A command-line interface to generate static types and custom route helper functions

🔗 A <TypedLink /> component which wraps Next.js <Link /> and provides type-safe path matching

📝 A pathFor helper that enables path generation in a type-safe manner

Usage#

$ pnpm add next-static-paths
# or
$ yarn add next-static-paths
# or
$ npm install next-static-paths

Then, from within your Next.js application root, run the following command:

# For pnpm users
$ pnpx next-static-paths

# For yarn users
$ yarn next-static-paths

# For npm users
$ npx next-static-paths

Usage screenshots#

Path autocomplete#

Path autocomplete

Dynamic path segment type checking#

dynamic path segment type checking