Project Structure in Astro

From the Astro cheat sheet · Getting Started · verified Jul 2026

Project Structure

text
my-astro-site/
├── src/
│   ├── components/     # Reusable components (.astro, .jsx, .vue)
│   ├── layouts/        # Page layouts with <slot />
│   ├── pages/          # File-based routing
│   ├── content/        # Content collections (Markdown/MDX)
│   └── assets/         # Images, fonts processed by Astro
├── public/             # Static assets (copied as-is)
└── astro.config.mjs    # Astro configuration
✅ src/pages/ creates routes automatically via file name
💡 public/ files served at root without processing
🔍 src/content/ requires content.config.ts for collections
⚡ All file types supported: .astro, .js, .ts, .jsx, .tsx, .vue, .svelte
structureorganizationfiles

More Astro tasks

Back to the full Astro cheat sheet