Overview
The project follows Astro’s minimal starter template structure, optimized for building static landing pages:Core Directories
src/pages/
src/pages/
Contains your Astro pages that become routes in your application.
- Each
.astroor.mdfile becomes a route based on its filename index.astromaps to/(homepage)- Nested files create nested routes (e.g.,
about.astro→/about)
public/
public/
Stores static assets that are served directly without processing.
- Files are served at the root path
/ - Currently contains
favicon.icoandfavicon.svg - Add images, fonts, and other static files here
- Files are not processed by Astro’s build system
src/components/
src/components/
Though not present in the minimal template, this is the recommended location for reusable components.
- Create Astro components (
.astro) - Add React, Vue, Svelte, or Preact components
- Build UI elements like headers, footers, and cards
You’ll need to create this directory when building out your landing page components.
Configuration Files
astro.config.mjs
The main configuration file for your Astro project:- Add integrations (React, Tailwind, etc.)
- Configure build output settings
- Set up adapters for SSR
- Define site metadata
package.json
Defines project metadata, dependencies, and npm scripts:npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locally
tsconfig.json
TypeScript configuration using Astro’s strict preset:.astro files and TypeScript code.
Build Artifacts
These are already included in
.gitignore:
Adding New Directories
As you expand your landing page, consider adding:src/components/
Reusable UI components
src/layouts/
Page layout templates
src/styles/
Global CSS and style files
src/assets/
Optimized images and media
Next Steps
Now that you understand the project structure:- Learn about development workflow
- Explore deployment options
- Review configuration options