Built with Astro
Here's a rough outline of the directory structure.
/
โโโ public/
โ โโโ favicon.ico
โโโ src/
โ โโโ components/
โ โ โโโ Layout.astro
| โโโ css/
| | โโโ styles.css
| โโโ layouts/
| | โโโ blogPost.astro
| | โโโ mainLayout.astro
โ โโโ pages/
โ โโโ index.astro
โโโ 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 or layouts.
Any static assets, like images, can be placed in the public/
directory.
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm run dev |
Starts local dev server at localhost:3000 |
pnpm run build |
Build your production site to ./dist/ |
pnpm run preview |
Preview your build locally, before deploying |