Skip to content

Moving to Astro

Published: at 00:00reading time3 min readSuggest Changes

Intro

Astro v1.0 was announced not long ago with the support of server-side rendering. Most static-site generators that I have used before were single-page application frameworks (like Gatsby, Next.js, and Scully), whereas Astro is a multi-page application framework but slightly doifferent! It was designed fr building content-rich websites, and the support for MDX is why I made the transition.

Table of contents

Open Table of contents

Previous problem

I’ve used the Angular framework a lot in the past for multiple projects so that’s why I have given an attempt and used Scully (a static site generator for Angular) to build a personal website. In short, I have found the following problems:

Why Astro

A couple of reasons:

  1. It is fast. Astro serves HTML files and strips away unused JavaScript thus increasing client loading speed.
  2. It was designed for content-focus websites such as blogs, documentation and portfolios.
  3. Support for MDX :)
  4. UI-agnostic. This means I can write codes using different frameworks and mix them on the same page. For example, I can use React to create interactive visualisation (React has a much bigger visualisation ecosystem than other frameworks), and use Svelte to build my website to take advantage of its simplicity.
  5. Good documentation. Setting up an Astro project and finding out how to do things in Astro was a very good experience thanks to the documentation. Before I actually started to set up a project, I was able to form a rough idea how to replicate/migrate features from my past projects by just reading the documentation.

If you’re interested, head to the docs to learn more.

Alternatives

There are other frameworks which can be used as SSG, here are some popular ones:


Previous Post
Asynchronous task scheduling for the Music AI project
Next Post
SEO for angular apps