Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/contentful/what-is-astro
Companion repository for the guide "What is Astro" on the Contentful blog
https://github.com/contentful/what-is-astro
astro hybrid islands
Last synced: 8 days ago
JSON representation
Companion repository for the guide "What is Astro" on the Contentful blog
- Host: GitHub
- URL: https://github.com/contentful/what-is-astro
- Owner: contentful
- Created: 2023-05-18T19:18:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-01T17:57:06.000Z (6 months ago)
- Last Synced: 2025-01-29T22:24:04.253Z (14 days ago)
- Topics: astro, hybrid, islands
- Language: Astro
- Homepage: https://www.contentful.com/blog/what-is-astro/
- Size: 316 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# What is Astro? An overview
Companion repository for the guide "[What is Astro](https://www.contentful.com/blog/what-is-astro/)" on the Contentful blog.
Created with `npm create astro@latest -- --template basics`
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```
/
├── public/
├── src/
│ ├── content/
│ ├── components/
│ ├── layouts/
│ └── pages/
└── 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 we like to put any Astro/React/Vue/Svelte/Preact components.
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:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |