This is my space to share new ideas and generally record what I may or may not need in the future.
yarn install && yarn dev
Content:
- β Minimal styling
- β 100/100 Lighthouse performance
- β SEO-friendly with canonical URLs and OpenGraph data
- β Sitemap support
- β RSS Feed support
- β Markdown & MDX support
Inside of your Astro project, you'll see the following folders and files:
βββ public/
βββ src/
βΒ Β βββ components/
βΒ Β βββ content/
βΒ Β βββ layouts/
βΒ Β βββ pages/
βββ astro.config.mjs
βββ README.md
βββ package.json
βββ tsconfig.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.
The src/content/
directory contains "collections" of related Markdown and MDX documents. Use getCollection()
to retrieve posts from src/content/blog/
, and type-check your frontmatter using an optional schema.
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 |
---|---|
yarn install |
Installs dependencies |
yarn dev |
Starts local dev server at localhost:3000 |
yarn build |
Build your production site to ./dist/ |
yarn preview |
Preview your build locally, before deploying |
yarn astro ... |
Run CLI commands like astro add , astro check |
yarn astro --help |
Get help using the Astro CLI |