🎉 Website's new version

Published by Richard Dern on in Blog. Download as PDF

Il existe une version française de cet article.

This is it: you're now looking at this website's new version. I spent more time on it than I wanted, but I'm happy with the result.

I had some rules and targets for it.

Published resources

Up until now, I was just publishing articles, links pointing to interesting websites, and a few pictures. The new version would allow visitors to download all kinds of files, not just images. For instance, zip files containing source code, or PDF documents.

I also wanted these resources to be easily embedded, so now they can be seen as simple inline links, or as a stand-alone block between paragraphs. You will find some examples later in this article.

I've added a nice touch: when I embed a link to an external resource and there's a favicon for it, it will be displayed on its left side (you'll see some of them in the following lines). Note that these favicon are stored in a local cache.

French and English localizations

Every resource published on this website may be read in French as well as English. And their representation must be updated everytime you switch between languages: it would be pointless to see a box showing a file in French when you browse the English version of this website... It looks obvious once put like that, but as soon as you work on localization in terms of development, it becomes particularly tricky, despite everything that exists to help developers on that matter.

Technically, every resource, being a folder, an article, a link, etc. is unique, and some fields could be written either in French, in English, or both. If one version is missing, the other is visible instead. This way, all of this website's content is always available, even if you browse the website in English and a resource is not available in that language.

Every resource has two addresses: one in French and one in English. They are visible in resource's headers, below its title, where you'll see a link to consult it in the other language, if the translation is available.

There is nothing ground breaking on the client side, but unlike other publishing platforms, translating a resource doesn't create a new resource in the database. There is only one resource to manage from my point of view, and it tremendously simplifies management and re-use, especially when embedding a resource into another. Typical use case: I want to embed a link to a wikipedia page in an article being translated into French and English. Of course, the wikipedia page should point to the English version when browsing the English version of MFS. Usually, I would have added a link to the French wikipedia in the French version of the article, and another link to the English wikipedia in the English version of that article. In this case, I have only one resource pointing to wikipedia, with two links, one for each language. Consequently, I use the exact same code to embed it in my article, regardless over the language I'm writing it in, so when I embed it, the correct language will be automatically displayed.

It rendered the code a bit more complex, but it is worth it: publishing with translations is now a lot easier.

Lightness, speed

MFS is now hosted on a FaviconRaspberry Pi 4 for a few weeks. So, despite website's evolution, it must stay light and fast. As it is simple, it also must be possible to browse it from any kind of device, including terminal emulator.

It has been a self-imposed rule since the very first version of the website. By this means, I exclude javascript, which, I believe, would not add much to the "user experience". Same applies to big front-end frameworks such as FaviconBootstrap.

Because I'm not using javascript, you can also be sure this website doesn't use any kind of tracker. To be honest, I could have used trackers embedded in pictures, but I don't. I have no interest in tracking you, and again, it has been my rule since the first version of MFS. How could I use tracking and at the same time say it is evil. Well, that said, some people do that... Anyways, no trackers, and no FaviconCDN either on my-freedom.space. Everything you get from MFS comes from MFS, and never, in any circumstance, from someone else.

Up until now, I have used FaviconNormalize.css as a well established and well-known base, and built my styles on top of it. It's cool for a time, but now I feel the need of resting on something more aesthetically advanced, without reinventing the wheel.

I've discovered Picnic, which has a lot of pros:

We are far, far away from Bootstrap.

I have rewriten 98% of the code from scratch. A lot of things have changed, but essentially not on the client side. You'll just see content diversity. But from my point of view, it will be a lot more pleasant to publish, knowing I'll begin to also write in English. So, I hope you will get as much pleasure from reading me as I get from writing. Thanks to this new version !

Comments

New comment

If you specify an email address, it will be used only to send you notifications about new comments on this page. You can use markdown and syntax highlighting to format your message.