Welcome to Astro Starter Kit

July 31, 2021 ยท View on GitHub

๐Ÿš€ Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ assets/
|   |-- style/
โ”‚   โ””โ”€โ”€ favicon.ico and other files
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ””โ”€โ”€ BlogPreview.astro, Podcast.astro, and other such components
โ”‚   โ””โ”€โ”€ pages/
โ”‚   |   โ””โ”€โ”€ index.astro, and other pages
โ”‚   โ””โ”€โ”€ layouts/
โ”‚       โ””โ”€โ”€ page.astro, and other layout components
โ”‚   โ””โ”€โ”€ data/
โ”‚       โ””โ”€โ”€ static data files (json)
โ””โ”€โ”€ package.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where any Astro/React/Vue/Svelte/Preact components could be found.

Any static assets, like images, can be placed in the public/ directory.

๐Ÿงž Commands

All commands are run from the root of the project, from a terminal:

CommandAction
npm installInstalls dependencies
npm run startStarts local dev server at localhost:3000
npm run buildBuild your production site to ./dist/

๐Ÿ‘€ Want to learn more?

Feel free to check our documentation or jump into our Discord server.