Website update, Now powered by Svelte!
Samschtig,24 April, 2021

Previously, I was very sceptical (to say the least) about “static websites”. There are several limits and somehow don’t feel as cool as dynamic websites.

Little I knew that “static” today doesn’t mean just writing a bunch of HTML pages and upload them in a folder via SFTP.

Several frameworks like svelte do provide with several options. Through Sapper you can load data
via an API or markdown.

But the real power is not just in generating a static site, but using a service like netlify, Vercel or Cloudflare pages that
will build your site using the generator of your choice (e.g. hugo, sapper, Jeckyl etc.) fetch it automatically once you push to git, build it and deploy it not just in a server but a global CDN. This is Continuous delivery. I am impressed!

Migrating a dynamic blog with articles in MySQL requires either creating an API OR, if we keep the articles in markdown, converting the mysql data to markdown.

I won’t say it was easy, but here it is: this blog is now powered by Svelte and deployed continuously with cloudflare.

This is my first article written directly in markdown and – so far – I love it. I can just write directly in the code editor (in my case Nova on Mac OS), push and in few minutes the updates will be reflected in the global CDN.

I loved every moment of building this blog in different programming languages (NodeJS, Python and PHP8) but I start to enjoy this change challenge.

I even tried over static generators as exotic as being written in SWIFT (more to come in future blog posts perhaps) but Svelte makes page loading extremely fast (it compiles the site in HTML, CSS and plain vanilla JS) and is much easier to learn than Vue, React or Angular.

Design-wise the blog is not too fancy but we still have claps (a bit dynamic!), amazing fonts and enhanced speed. Security has also been boosted greatly: I don’t have to worry about which version of Node, Python or PHP I am using as the site gets always build into static HTML pages.

Time for pushing this article to git and see the results live very soon :)