Blog renewed

Home RSS
12.9.2021

Webdev


And there we continue after (another) longer break!

Attention, this post is less about graphics and 3D, but instead more about webdev. If you don’t like that, please use the new filter tag options – simply press the red “X” in the upper right corner, next to “Webdev”, and done!

New Blog

The blog got a whole new technical foundation, rewritten from scratch! Who has been here before, has probably noticed that. I thought, maybe the reasons for this are interesting for some people. Personally I found it helpful to read other people reasonings about that topic.

Technologies

Instead of writing the whole thing manually, I am using one of those JS-frameworks now. Since I always tend to prefer underdogs, I decided for ↳Svelte, and not something like React. Beside personal taste, I had some proper reasons as well:

  • no runtime
  • faster
  • smaller down­load
  • less boiler­plate

Ontop of Svelte I am using ↳Svelte­Kit (mostly for routing, the website is static and clientside), as well as ↳Mdsvex (mark­down-pre­proces­sor).

Old vs new

How is the npm-project putting up against the lean, simple, robust hand-written code?

Usability

The old blog was very cumbersome when it came to adding new content. Posts have been written directly in HTML (which was ok for me, though), but to get a new post live, I had to change stuff in three different files. Also the directory structure for the images got out of hand quickly after reaching some size.

Now I am writing in markdown, and to actually update, I have to recompile and upload the whole blob. The feed.xml file (for RSS) I currently still maintain manually, but will look into this later.

CSS

My old CSS was pretty messy and old-fashioned - making no use of CSS grid, because the browser support was not good enough at the time (2017 roundabout).

Thanks to Svelte I now enjoy the advantages of scoped CSS, and doing layouts with grid and flexbox is, in comparison to float and clearfix, a dream.

Routing

Routing, in a nutshell, is when you visit a page “hello” and the adress bar of your browser says something like “website.com/hello”. And vice versa, if you type that into your browser, you get to exactly that page.

My old blog couldn’t do that. I tried to implement basic routing myself, got almost there, but there have been problems with browser history and some seemingly random errors and misbehaviour popping up.

This task gets handled in the background by SvelteKit now, in a reliable manner. I would say, the lack of routing definitely was the main reason for the whole rewrite.

Post No. 20

I mentioned a mini anniversary when I published the thenth post, and now while almost being done with that one, I realize it’s the twentieth – just to mention.

Which topic to cover in the next post — well I don’t know myself yet!

But doing another post without a single image should be pretty unlikely.