Course lesson
Create Static Pages in Astro Using File Based Routing
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.
- Duration
- 3 min
- Access
- Included
- Transcript
- Retained from source evidence
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