Skip to content

Converting My Blog to Astro

Published: at 03:17 AM

It may sound counterintuitive, but I tend to spend a lot of time trying to be lazy. When I set up my blog I was trying to find a solution where:

  1. I want to own and control my content.
  2. There should be only minimal steps to deploy my site.
  3. The site should be generated by a static site generator, since I do not want to constantly maintain/upgrade/secure my server.

My old setup was based on pelican and for the most part it worked ok. I found a great template and was sticking with it for a long time.

Since recently I got into some typescript/react application development, I want to switch my web stack to be more typescript-based. This mean I can leverage a greater number of front-end libraries out there.

It seems like Astro is a great tradeoff between simplicity and expressiveness. I knew React before, and I’m familiar with the component framework and SPA (single page application) in general. Since my old site was statically generated, I don’t really feel like that I want to start from scratch. Astro came into the picture where I can focus on writing the content without worrying so much about all the issues that come between having a static site without the option to be more dynamic. In such case the choices that Astro made started to make sense.

Overall I really started to like the rapid deployment model and regenerating the page a lot. Comparing to pelican I’m able to actually leverage font-end libraries. I can focus on the content creation in Markdown and don’t have to worry about deployment.

Here is my old vs. new setup:

ItemOldNew
Site GeneratorPelicanAstro
HostingDigitalOcean VPSS3 Static Web Hosting
RegisterNamecheapAWS
Cert/Content DeliveryCustom Generated/NoneCloudFront

I think overall it worked out pretty well. I’m able to set up a GitHub action to basically deploy automatically. When I merge into the master branch it’ll just rebuild the site and deploy through AWS sync. There’s really no server to worry about. I only pay for the storage cost and CloudFront essentially. I completely own my site and I can move it anywhere I would like.

More details on setting these up will come later.