Astro Starter Kit: Basics #
pnpm create astro@latest -- --template basics
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
Continuous deployment to Netlify #
This project is configured to deploy automatically to Netlify via Tangled CI:
- Pull requests create a Deploy Preview
- Pushes to your default branch (usually
main) create and publish a production deploy
⚠️ Steps to follow if you've just cloned this repo #
If you already have a Netlify site you want to use, link it locally to this project:
# run in your project dir
pnpm exec netlify link
Otherwise, create a new empty site:
# run in your project dir
pnpm exec netlify sites:create
Next, find your site ID (or "project ID"). You can find this on your project configuration page in the Netlify app or you can run:
pnpm exec netlify status
Insert your site id in .tangled/workflows/deploy.yml as the value of SITE_ID.
(If you prefer, you can delete this line and set this as a pipeline secret instead.)
Finally, generate a Netlify access
token and set it as a pipeline secret named NETLIFY_AUTH_TOKEN.
NOTE: This will deploy to production from the main branch. To use a different branch or disable
this entirely, update .tangled/workflows/deploy.yml.
Push something and you should be all set. Happy deploying.
🚀 Project Structure #
Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ └── favicon.svg
├── src
│ ├── assets
│ │ └── astro.svg
│ ├── components
│ │ └── Welcome.astro
│ ├── layouts
│ │ └── Layout.astro
│ └── pages
│ └── index.astro
└── package.json
To learn more about the folder structure of an Astro project, refer to our guide on project structure.
🧞 Commands #
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
pnpm install |
Installs dependencies |
pnpm dev |
Starts local dev server at localhost:4321 |
pnpm build |
Build your production site to ./dist/ |
pnpm preview |
Preview your build locally, before deploying |
pnpm astro ... |
Run CLI commands like astro add, astro check |
pnpm astro -- --help |
Get help using the Astro CLI |
👀 Want to learn more? #
Feel free to check our documentation or jump into our Discord server.