---
title: "staticPaths"
description: "Collects every path in a route map that can be requested without params: the Remix 3 answer to \"what pages does this app have\", and the input a prerender pass needs before it knows any dynamic values."
url: "https://pitlane.tools/package/crawler/function/staticPaths"
---

# staticPaths

```ts
import { staticPaths } from "@pitlane/crawler";
```

```ts
function staticPaths(routes): string[];
```

Collects every path in a route map that can be requested without params: the Remix 3 answer to "what pages does this app have", and the input a prerender pass needs before it knows any dynamic values.

A route qualifies when it answers `GET` (or any method) and its pattern declares no variables or wildcards. `/blog` is a static path; `/blog/:slug` is not, because its values live outside the route map. Routes constrained to a protocol or hostname are skipped too, since their href is not a path.

Results are deduplicated and sorted, so a build that prerenders them lists its output the same way every time.

## Parameters

### routes

`RouteMap`

The route map, usually the one the app's router is built from.

## Returns

`string`\[\]

The static paths, sorted.

## See

- [Crawler guide: Asking what pages exist](https://pitlane.tools/guides/crawler.md#asking-what-pages-exist)
- [Prerendering guide, without a build: Where the paths come from](https://pitlane.tools/guides/prerendering-no-build.md#where-the-paths-come-from)
