Astro makes it easy to build fast, content-focused websites. Here’s how to get started.
Installation
Create a new Astro project with:
npm create astro@latest
Or if you prefer a minimal setup:
npm init -y
npm install astro
Project Structure
A typical Astro project looks like this:
├── src/
│ ├── layouts/
│ ├── pages/
│ └── components/
├── public/
├── astro.config.mjs
└── package.json
Creating Pages
Pages in Astro can be:
.astrofiles for component-based pages.mdor.mdxfiles for content pages
Any file in src/pages/ automatically becomes a route.
Building for Production
Build your site with:
npm run build
The output will be in the dist/ folder, ready to deploy anywhere!