Project Structure
Typical layout:
my-astro-site/โโ public/ # Static assets served at site rootโโ src/โ โโ pages/ # Route-based pages (*.astro, *.md, *.mdx)โ โโ components/ # Reusable UI componentsโ โโ layouts/ # Page layoutsโ โโ content/ # Content Collections (optional)โโ astro.config.mjs # Astro configโโ package.json # Scripts and depsโโ tsconfig.json # TS config (optional)
Notes:
- Files in
public/
are copied to the root of the built site. - Files in
src/pages/
become routes based on filename. - Layouts live in
src/layouts/
and can be shared across pages. - Content Collections use
src/content/config.*
with schema definitions.