> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# SDK Types: Routing

**Publié le** : 2026-08-20
**Catégorie** : Types

# SDK Types: Routing

> **Related services:** **PathsService** — `lynkow.paths.list()`, `lynkow.paths.matchRedirect()`, `lynkow.paths.resolve()`

## `Path`

*Interface*

A renderable path for static site generation (SSG/ISR).
Represents a published content article or category that has a public URL.
Use `paths.list()` to fetch all paths, then generate static pages for each.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `lastModified` | `string` | No | ISO 8601 datetime string of the last modification.<br>Corresponds to the content's `updatedAt` or the category's `updatedAt`.<br>Useful for setting `lastmod` in XML sitemaps or `Last-Modified` headers. |
| `locale` | `string` | No | Locale code for this path (e.g. `'en'`, `'fr'`).<br>Multi-locale sites generate separate paths for each locale.<br>Use this to set the page's `lang` attribute or route locale. |
| `path` | `string` | No | Full URL path including leading slash and locale prefix.<br>Ready to use as a route path. Includes category segments in nested mode. |
| `segments` | `string[]` | No | Individual path segments (split by `/`, without leading empty string).<br>Useful for Next.js `generateStaticParams()` catch-all routes. |
| `type` | `"content" \| "category"` | No | The type of resource this path points to:<br>- `'content'`: a published blog article (resolve returns full Content)<br>- `'category'`: a category listing page (resolve returns CategoryDetail + paginated contents) |


---

## `Redirect`

*Interface*

A URL redirect rule configured in the admin dashboard.
Returned by `paths.getRedirects()`.
Apply these as server-side redirects in your framework's routing configuration.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `preserveQueryString` | `boolean` | No | Whether to append the original request's query string to the redirect target.<br>When `true`, a request to `/old?page=2` redirects to `/new?page=2`.<br>When `false`, the query string is discarded. |
| `source` | `string` | No | Source path pattern to match incoming requests against.<br>Always starts with `/`. May contain path segments but not query strings. |
| `statusCode` | `301 \| 302 \| 307 \| 308` | No | HTTP status code for the redirect:<br>- `301`: Permanent redirect (cached by browsers and search engines; passes link equity)<br>- `302`: Temporary redirect (not cached; used for A/B tests or maintenance)<br>- `307`: Temporary redirect preserving the HTTP method (POST stays POST)<br>- `308`: Permanent redirect preserving the HTTP method (POST stays POST)<br><br>Use `301` for SEO-friendly permanent moves; `302` for temporary changes. |
| `target` | `string` | No | Destination path or full URL to redirect to.<br>Can be a relative path (starts with `/`) or an absolute URL. |