Getting Started with Astro

Getting Started with Astro Astro is revolutionizing the way we build static websites. With its innovative approach to web development, you can create blazing-fast websites that ship zero JavaScript by default.

🌟 Why Choose Astro?

Astro brings several compelling advantages:

  • Zero JavaScript by Default: Your pages load incredibly fast
  • Component Islands: Use any framework (React, Vue, Svelte, etc.)
  • Built for Speed: Optimized build process and output
  • Great DX: Excellent developer experience with hot reloading

πŸš€ Getting Started

To create your first Astro project, run:

npm create astro@latest

Follow the prompts and you’ll have a working Astro site in minutes!

πŸ—οΈ Basic Project Structure

my-astro-project/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ layouts/
β”‚   └── pages/
β”œβ”€β”€ public/
└── astro.config.mjs

πŸ“ Your First Page

Create a file at src/pages/index.astro:

---
const title = "My Astro Site"
---
<html>
  <head>
    <title>{title}</title>
  </head>
  <body>
    <h1>Welcome to Astro!</h1>
  </body>
</html>

πŸ”œ Next Steps

  • Explore Astro’s component system
  • Learn about content collections
  • Try different UI frameworks
  • Deploy your site to production

Happy coding with Astro! πŸš€

← Back ↑ Top