We are starting a course on Astro, a web development framework initially for static site generation, focused on content and speed.
In its origins, Astro emerged as a static HTML generator, designed to reduce the amount of JavaScript on web pages. The goal is to make them simpler, faster, and more optimized for SEO.
We will talk more about the advantages of Astro later. But first, as it is a fundamental part of understanding Astro, let’s review what a static generator is 👇.
Astro is one of my favorite technologies for web development. In fact, this website you are seeing is made in Astro 💛.
Astro as a static generator
In the early days of the web, sites were static. That is, they were HTML and CSS files that displayed the same content to all users (until you change them, of course).
As websites needed to have more complex behaviors (social networks, user profiles, shopping carts), technologies like PHP, or JS frameworks like Angular, React, Vue were created.
There is nothing wrong with using these tools, but most websites do not need that much complexity (you are using a sledgehammer to crack a nut).
SSGs (static site generators) emerged to solve this. They are tools that help us generate static websites. And there are many available (like Astro, Hugo, Jekyll…).
Just because a website is static doesn’t mean it “doesn’t do things”. The page can change with JavaScript, even load data.
What it means is that the files are the same for all users (until they are changed on the server, of course)
Advantages of Astro
Now, what advantages does Astro have as a static generator? What advantages over other generators? I’ll say it very clearly, it’s super comfortable to work with Astro.
And also, it has other advantages. (many common with all static generators). Some of these are:
- Performance and speed: Astro generates very fast and lightweight pages.
- Integration with frontend frameworks: You can use components from React, Vue, Svelte, and other frameworks.
- Support for Markdown and MDX: Allows you to add content in Markdown and MDX (ideal for blogs and documentation).
- SEO improvement: Small and fast sites are preferred by Google (it doesn’t perform miracles, but it won’t hurt your site).
- Easy deployment: You can deploy your site anywhere because it doesn’t require a special backend (ASP, PHP, Node, etc)
In short, the development experience is really good. It’s very comfortable and easy to build websites. Astro is well thought out.
The feeling when using it is “like coming home”. It should always have been this way. With a taste of hot chocolate and cookies.
And since it is one of my favorite technologies, the course is coming 🎉🥳!