What Astro does, and why it's for you
Astro turns the pages you write into a finished website. Here's what it does for you, what it doesn't, and why it suits a first website.
You know what a website is: files on a host. Now, where do the files come from? That’s Astro’s job.
Astro is a kitchen
Think of a restaurant. You write the recipes. The kitchen turns them into finished plates.
Astro is the kitchen. You write pages in a simple form. Astro turns them into the finished files that browsers need. You never hand-build the finished files yourself.
What you write
You write two kinds of thing:
- Pages, in files that end in
.astro. They look like HTML with a little extra at the top. - Writing, like blog posts, in Markdown. Markdown is plain text with a few marks. Two stars around a word make it bold. A hash at the start of a line makes a heading. That’s nearly all of it.
You can also make a piece once and use it on every page. A menu, say. Astro calls that a component.
What Astro does for you
- Turns your pages into finished files, ready for a host
- Shows you your site on your own computer while you work, updating every time you save
- Makes a page for every blog post you write
- Shrinks your pictures so pages load fast
- Sends no JavaScript to visitors unless you ask for it, which is why Astro sites feel quick
What Astro doesn’t do
Astro has no dashboard to log in to. You edit files. For many people that’s simpler, not harder. If you’d rather have a dashboard, there’s a tool called EmDash that adds one to Astro. We explain it in what is EmDash.
Why it’s good for a first site
- It’s free, with no account to make.
- The finished files can go on a free host.
- There’s very little to maintain. No updates, no plugins, no logins to protect.
- You learn how the web really works, one small step at a time.
Two words you’ll hear
The dev server is the “show me my site while I work” part. You start it with npm run dev. Only you can see it.
A build is the “make the finished copy” part. You run it with npm run build. The copy goes in a folder called dist, and that folder is what you put on a host.
