Open sourceActive

Astro Routing

File-based routing system for Astro projects using the src/pages/ directory.

Open source page ↗

Product features

Product features

adapter

base

Configuration Reference

Examples

getStaticPaths()

Function generating multiple prerendered page routes from one .astro component with parameters.

integrations

output

params

Key of getStaticPaths() objects specifying route paths; values must be strings.

partial

Boolean route export marking content as a page partial instead of a full HTML page; default false.

prerender

Boolean route export controlling whether a route is prerendered; default true in static mode.

props

Optional data passed to each generated page via getStaticPaths(), accessible as Astro.props.

redirects

root

site

srcDir

Top-Level Options

trailingSlash