markmcdermott.io (js, ruby, ...etc) by mark mcdermott

Astro Learnings

Various Astro how-tos

03/16/2025

read time:2 mins

Honing basic Astro areas

Astro’s pretty easy to use, but I’ve been a little rusty and wanted to get some of the common stuff into muscle memory. Here are my notes.

Things I want to cover

Starter templates

The Astro create CLI is pretty straightforward. yarn create astro <name> will create the folder and an Astro project in it. It will ask you if you want to use a template and if create a git repo or not.

For templates, Astro has about four options you can pick in the CLI. They have many more official templates you can use, some free some not. Even some of the free ones look amazing and the paid ones look really solid. And you can use any Astro git repo as a template, it doesn’t have to be an official one.

You can also specify any integrations you want here, too. Examples are Tailwind, Vue, astro-font, analytics, lucide fonts, auth, etc.

The --install/--no-install flag will install/not install the dependencies for you.

yarn create astro <name> yarn create astro . yarn create astro --template <name> yarn create astro --git / --no-git yarn create astro --install / --no-install yarn create astro --add mdx yarn create astro <name> --install --git --add tailwind --template minimal

Tailwind

Instructions to add Tailwind are here

Sass

Tailwind & Sass

import "./styles/global.css";
import "./styles/custom.scss";

Markdown