Why I love Astro as a static site generator

There are numerous static site generators out there. Each one of them have their own strength and weaknesses. For instance, I  have been building static websites with frameworks like Nuxt and Next. These frameworks are solid in their own way and they get the job done. However, in recent times, out of curiosity, I decided to upgrade my portfolio website to a newer framework called Astro. At first I was not sure if it was worth a try but I decided to test it out anyway.

It wasn't long before I fell in love with it. Astro is wicked fast, almost similar to Hugo. Both of them operate on zero or near zero Javascript on the client side. This means that websites render like static html files thus greatly improving performance. One of the major things that made me admire Astro is its light weight output. Initially, I had built my portfolio site with Nuxt and its total size after Gzip compression was at about 450kb. After moving to Astro, the core application size dropped to about 56Kb. For me this is a huge boost in performance and am proud to say that Astro has captured my developer's heart.

Outlined below are some of the top reasons as to why I love Astro 

  1. It is a javascript framework that is compatible with other popular frameworks. You can migrate your React, Svelte or Vue Project to Astro with minimal code changes. You can even build your site using Vue, React and Svelte at the same time and still get  a fast website within the shortest time span.
  2. It renders extremely fast. At the heart of Astro, the templating engine  renders directly to HTML and CSS reducing the presence of Javascript bloating the pages.
  3. Dead code is auto magically removed and only essential UI components are hydrated as per your configuration. This feature is  a huge performance booster.
  4.  It is easy to deploy

You can view the code to my portfolio website on Github.