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.