In this post I want to explain the criteria I had for choosing a framework for my personal portfolio website and why I chose Astro.build š.
Most people I know who are no developers choose Wordpress for their website. Thatās a valid choice in most of the cases based on their background and available time. They build nice websites with shops and other integrations on it. But I donāt need most of it and I want more freedom and not spend my time to learn how PHP and the Wordpress ecosystem works.
I have to admit and thatās important for my decision and understanding of this post: Iām no experienced frontend developer, I just worked with React and Angular in smaller projects. Though I built my first personal website already in 1999 š“, but some new frontend frameworks came up in the meantime while some core technologies stayed.
I didnāt want to spent too much time in investigating and trying out different frameworks i.e. the framework should be easy to learn. If you are an experienced frontend developer and familiar with a specific framework, your criteria might be different.
Second criteria for me: It should be a mainly static website, because I just want to present content, at least in the beginning. Static website means the website consists entirely of (static) files, no content is generated dynamically on server side e.g. pulled from a database.
A great advantage of a static website is, that hosting is quite cheap, because you donāt need a classical server (only a webserver but thatās most times included). And I like to start just on plain AWS S3. Itās safe by design because there is no user data stored and non-existing servers canāt be attacked. Itās more performanent than a CMS and database backed framework like Wordpress. But Iām a bit careful with this last statement as Server side rendering (SSR, which is also supported by Astro.build) could also be very quick.
Disadvantage is you donāt have an web based CMS. Still I want to manage content easily and donāt want to invest too much time in design choices and definitely I donāt want to reinvent the wheel.
On the other hand I want a modern and flexible framework, which I can easily extend for whatever I need. E.g. easily add a contact form or some more dynamic stuff.
Another criteria was the support of Multilingual websites, because I was annoyed of Webflow which I had to use once and which surprised me when I found out it didnāt have that (you need to clone pages or integrate a dynamic translation service). This proved to be a more soft criteria for my website, so if thatās really important for you, please first check best practice in Astro for that.
It seems I needed a static site generator - that was a new term for me - and there are some.
I didnāt start googling āstatic site generatorā and then investigating the different ones. I just heard and read what other people were using and which frameworks were interesting for clients. But now when writing this post I did a bit of research and found that the SSGs I considered are on most lists of ābest SSGsā. Some websites mention still React-Static, but itās dead ā unfortunately. Interestingly Astro.build - the SSG Iām using now - is missing on these lists. Astro.build was recommended to me by a friend and is e.g used as kind of successor by the former maintainers of React-Static (see their last post) which means a lot because they are deep into that topic. As mentioned before and as itās obvious from the long list of SSGs below, I donāt have the time to learn and investigate every SSG in detail, but I hope my thoughts will help you find your own best solution.
First, for a different website, I tried out Hugo. It calls itself
The worldās fastest framework for building websites
I chose the theme Airspace Hugo which has Multilingual built-in and Forestry CMS support and customized it to my website. That worked well, but when starting now to build my personal portfolio website I thought again about it and Hugo felt very static with itās Go HTML templates. I suddenly wanted a framework which has ānativeā React support.
So next I checked the Gatsby website, because I had heard about it being used at clients.
Gatsby enables developers to build fast, secure, and powerful websites using a React-based framework and innovative data layer that makes integrating different content, APIs, and services into one web experience incredibly simple
I had only a quick look and discarded it due to two reasosn:
So then this time I really googled for something like āReact static websiteā and I came across NextJS. I heard about it before as NextJS skills were requested by clients, so I had a deeper look and it immediately felt very developer friendly and powerful.
The React Framework for Production. Next.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, smart bundling, route pre-fetching, and more. No config needed.
I mean to be honest it sounds even more complex than Gatsby and isnāt only focussed on static content websites. The pricing you find is related to Vercel, who drives NextJS but offers mainly CI/CD and hosting for websites.
There are a lot of templates made for blogs on the official page. As I didnāt want to spent too much time in designing and Iām not a designer anyway, I searched for more templates. Finally I found Tunis - Personal Portfolio Template and bought the license for 14$. I started setting a new color scheme which was quite easy and I put my profile image in there. Then I started to replace the template texts with my own texts. That was the point were I got a bit annoyed. The content looked ugly, because I just could change content in JSON files which wasnāt possible to style in any way in the template.
I used Jekyll once for a website, because Github pages supports it.
Transform your plain text into static websites and blogs. Simple - Static - Blog aware
It seems like a predecessor to Hugo but simpler. If you have really low requirements e.g. for a demo site and just need some structure and content templates, I would recommend it. And: You get free and simple hosting via Github pages !
Now, this website uses Astro.build.
Astro is the all-in-one web framework designed for speed. Pull your content from anywhere and deploy everywhere, all powered by your favorite UI components and libraries.
It was very simple to setup and understand the structure. Iām using the Astro Bolierplate theme. It supports Blog posts via Markdown, TypeScript and React styled with Tailwind CSS.
I just adapted three .tsx files for the main page and uploaded some images. Styling via Tailwind CSS is also super easy. Then I wrote blog posts like this one in Markdown and linked three of them, which describe my project experience, to be teasered on the main page.
I just scratched the surface of what Astro is capable of, but itās already enough to setup this personal webpage. First more complicated thing I checked was to integrate a React component which has a state depending on the readerās scroll position on the page. Thatās how I found out about the (Shared State)[https://docs.astro.build/en/core-concepts/sharing-state/] recommendation in Astro which is Nano Stores.
So thatās what I will try next and blog about it here.