Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
The official Getting Started template for Astro, with a minimal project structure for building content-driven static sites.
The Astro Starter Kit: Basics is the official minimal scaffolding for an Astro project, giving you a one-command way to create a content-driven static site with the Astro web framework.
The Astro Starter Kit: Basics is the minimal official template for starting a new Astro project. It generates a clean project skeleton with public/, src/assets/, src/components/, src/layouts/, and src/pages/ folders, plus a package.json. Running npm run build outputs a production-ready static site to ./dist/. The template is maintained by the Astro team and lives in the examples/basics directory of the withastro/astro GitHub repository, where the framework repository itself has over 61,000 stars.
npm create astro@latest -- --template basics creates a new project with the exact structure used in this example.public/favicon.svg, src/assets/astro.svg, src/components/Welcome.astro, src/layouts/Layout.astro, and src/pages/index.astro, demonstrating the Astro convention of separating static assets, components, layouts, and pages.npm run dev starts a dev server at localhost:4321 with hot-reloading for rapid iteration.npm run build compiles the site into a static ./dist/ folder ready for any static host.npm run preview serves the built site locally so you can check the production output before deploying.npm run astro lets you run commands like astro add for integrations, astro check for type-checking, and astro --help for CLI assistance.astro add.npm run dev to experience Astro's developer experience and static-site performance firsthand.public, assets, components, layouts, and pages folders to understand where different file types belong.src/pages/index.astro with your own content, keep the Layout.astro for consistent markup, and run npm run build to generate a deployable site.After scaffolding, all commands run from the project root. First run npm install to install dependencies. Then use npm run dev for local development at localhost:4321, npm run build to create the production ./dist/ folder, npm run preview to test that build, and npm run astro to access the full Astro CLI for adding integrations or checking your project.
Yes. It is the basics example in the official withastro/astro GitHub repository, and the README links to the Astro documentation and Discord server.
It includes a minimal but complete project structure: a public/ folder with favicon.svg, a src/ folder with assets/ containing an Astro logo, components/ with a Welcome.astro component, layouts/ with a Layout.astro, pages/ with an index.astro, and a root package.json with scripts for install, dev, build, preview, and the Astro CLI.
Run npm install once, then npm run dev from the project root. The dev server starts at localhost:4321 by default.
Yes. The README provides one-click buttons to open the exact same project in StackBlitz, CodeSandbox, and GitHub Codespaces, all browser-based development environments.
