Back to blog
Jun 10, 2024
2 min read

Astro

A website framework for content-driven websites.

Astro is simply a lovely website framework for content-driven websites - as the advertising says. Why I like it is that it just works - and is very simply organised. I have been using Hugo for a while, and that taught me a lot : but Astro is just so nice. And it’s fast !

Astro

Like many others, installation is very simple:

npm create astro@latest
npm run dev

Then you need to think about:

  • pages : with an index.astro file in their own folder, which becomes the path, this gets you started
  • components : re-usable components, so you define your layouts once, and then settle down to just writing your pages
  • content : for when you have many similar pages and want to write markdown for speed, but have them all render the same way - like a blog.

The last point is what I really like : I can write all my documentation in markdown which is fast and familiar (and so much easier than writing HTML; very portable, too), add a little bit of frontmatter for standard fields and tags …

… and then it just works.

There is really very little to it - the tutorial is excellent, and I found some lovely free themes, including this one, the wonderful Astro-Sphere written by Mark Horn - which was very easy to customise and extend.