1. 4
    Create Static Pages in Astro Using File Based Routing
    2m 36s

Create Static Pages in Astro Using File Based Routing

InstructorLazar Nikolov

Share this video with your friends

Send Tweet

Astro uses file-based routing to generate routes within the project that you are working on. That means every folder and file you create under /pages will result in a route that reflects that file.

Here you can see how different pages will map to different routes in astro:

./src/pages/index.astro  -> /
./src/pages/about.astro  -> /about
./src/pages/index.astro  -> /blog
./src/pages/hello.astro  -> /blog/hello