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!
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.
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
- smaller download
- less boilerplate
Ontop of Svelte I am using SvelteKit (mostly for routing, the website is static and clientside), as well as Mdsvex (markdown-preprocessor).
Old vs new
How is the npm-project putting up against the lean, simple, robust hand-written code?
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.
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, 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.