<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jekyll on Melabit</title>
    <link>https://melabit.com/en/tags/jekyll/</link>
    <description>Recent content in Jekyll on Melabit</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 31 Dec 2025 06:00:00 +0000</lastBuildDate>
    <atom:link href="https://melabit.com/en/tags/jekyll/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A year of melabit.com</title>
      <link>https://melabit.com/en/2025/12/31/a-year-of-melabit-com/</link>
      <pubDate>Wed, 31 Dec 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/12/31/a-year-of-melabit-com/</guid>
      <description>&lt;p&gt;2025 was a turning point for this little blog. Leaving the &lt;em&gt;comfort zone&lt;/em&gt; of Wordpress.com was neither easy nor painless, especially when I discovered that &lt;a href=&#34;https://melabit.com/en/2025/01/02/2025-01-02-da-melabit-a-melabit-addio-wordpress-ciao-jekyll/&#34;&gt;once the site was online&lt;/a&gt;, Jekyll was slow, too slow to be usable.&lt;/p&gt;&#xA;&lt;p&gt;Thankfully, &lt;a href=&#34;https://melabit.com/it/2025/05/24/jeeeeeekyll-no-hugo/&#34;&gt;Hugo saved the day&lt;/a&gt;, although there are still many details to be ironed out, first and foremost the website&amp;rsquo;s graphic design.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-12-31-un-anno-di-melabit-com/Gemini_Generated_Image_r0phqqr0phqqr0ph.jpeg&#34; alt=&#34;&#34;&gt;&#xA;&amp;ndash; &lt;em&gt;Image generated by &lt;a href=&#34;https://gemini.google.com&#34;&gt;Google Gemini&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Managing posts in two different languages is not easy, but it is worth it, as posts in English allow to reach a pool of users that would be unimaginable if I only wrote in Italian.&lt;/p&gt;&#xA;&lt;p&gt;The main concern with the new site is the near absence of comments on posts. I don&amp;rsquo;t know if it&amp;rsquo;s because they&amp;rsquo;re too complicated, too long, or both. The fact is that the lack of comments is really worrying. And this is despite the fact that there are a good number of visitors and that on average 5% of them spend 15 minutes or more on the site. Maybe in the end they&amp;rsquo;re too exhausted to comment, who knows!&lt;/p&gt;&#xA;&lt;hr style=&#34;border: none; border-top: 3px double #333; color: #333; overflow: visible; height: 5px; width: 50%; margin-left: auto; margin-right: auto;&#34;&gt;&#xA;&lt;p&gt;Needless to say, I never use AI tools to write the posts. At most, I use them to look up a few technical terms when I can&amp;rsquo;t remember the Italian equivalent (for instance, I always forget that &lt;code&gt;Tab&lt;/code&gt; in Italian is &lt;code&gt;Scheda&lt;/code&gt;, not &lt;code&gt;Linguetta&lt;/code&gt;). Sometimes I try to use AI to improve the flow of a few sentences, but it&amp;rsquo;s almost always a waste of time. In the end, the text sounds so flat that it&amp;rsquo;s better not to write it at all.&lt;/p&gt;&#xA;&lt;p&gt;However, I admit that I use AI for the initial translations. I need it mainly to save typing time, even though it then takes quite a while to refine the result and make the translation more fluid and natural.&lt;/p&gt;&#xA;&lt;p&gt;I also often use AI to generate the images at the top of the posts. In this case, I have no choice. While I&amp;rsquo;m not bad at writing, I&amp;rsquo;ve always been second to last in the class when it comes to drawing and graphics, and only because the last one was really terrible. So I&amp;rsquo;m doing you a favor. But even with Google&amp;rsquo;s much-celebrated &lt;a href=&#34;https://gemini.google/overview/image-generation/&#34;&gt;Nano Banana&lt;/a&gt;, it took a lot of effort to convince it to generate the image for this post, with the right text, the real homepage, and so on. Anyone who says that Nano Banana is so smart that it understands what you want right away is telling you lies.&lt;/p&gt;&#xA;&lt;hr style=&#34;border: none; border-top: 3px double #333; color: #333; overflow: visible; height: 5px; width: 50%; margin-left: auto; margin-right: auto;&#34;&gt;&#xA;&lt;p&gt;If all goes well, 2026 will bring some new developments. I&amp;rsquo;m not sure in what order, but revising the graphic theme is definitely at the top of the list.&lt;/p&gt;&#xA;&lt;p&gt;Stay tuned! In the meantime, best wishes for 2026. May it be a year full of good things and happiness for everyone!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Jeeeeeekyll? No, Hugo!</title>
      <link>https://melabit.com/en/2025/05/24/jeeeeeekyll-no-hugo/</link>
      <pubDate>Sat, 24 May 2025 00:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/05/24/jeeeeeekyll-no-hugo/</guid>
      <description>&lt;p&gt;As &lt;a href=&#34;https://melabit.com/en/2025/01/21/from-melabit-to-melabit-why-jekyll/&#34;&gt;I was writing about my transition from WordPress to Jekyll&lt;/a&gt;, I knew I had to prepare for another change.&lt;/p&gt;&#xA;&lt;p&gt;From a technical point of view, &lt;a href=&#34;https://jekyllrb.com/&#34;&gt;Jekyll&lt;/a&gt; is a fantastic platform: it is easy to program, has impeccable documentation, and works perfectly during the development phase, with a limited number of pages and test posts. But, as I experienced firsthand, when Jekyll is asked to handle a real site with hundreds of posts, performance drops dramatically and response times become unbearably slow (and quite embarrassing, too).&lt;/p&gt;&#xA;&lt;p&gt;In the late &amp;rsquo;90s, it was normal to wait several seconds for a webpage to load.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; But today, we&amp;rsquo;re used to pages that load instantly, so having to wait three or four seconds is  unacceptable.&lt;/p&gt;&#xA;&lt;h4 id=&#34;a-high-price-to-pay&#34;&gt;A high price to pay&lt;/h4&gt;&#xA;&lt;p&gt;Before I started working on the new site, I was well aware that Jekyll was slow. However, this slowness was always attributed to the &lt;strong&gt;site generation phase&lt;/strong&gt;, which is performed sporadically and can be automated. And that was exactly what happened: during development, with a few dozen posts, I could regenerate the site in 10–20 seconds, quite annoying, but not dramatic; now it takes 15 minutes to regenerate the entire &lt;a href=&#34;https://melabit.com/&#34;&gt;melabit.com&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What I didn’t know was that the &lt;strong&gt;generated site&lt;/strong&gt; would also suffer from the same problem, which became evident as soon as I finished the development phase and started working with all the posts.&lt;/p&gt;&#xA;&lt;p&gt;At that point, I was still convinced that optimizing the code and images and applying an aggressive &lt;em&gt;caching&lt;/em&gt; would mitigate the issue. And in any case, I had gone too far to turn back. However, I soon realized that this strategy wasn’t enough, and that a radical rethink was necessary. So I started looking around.&lt;/p&gt;&#xA;&lt;h4 id=&#34;alternatives&#34;&gt;Alternatives&lt;/h4&gt;&#xA;&lt;p&gt;Static site generators are like Linux distributions: there are too many of them, and in most cases it’s hard to understand why they even exist. At the moment, &lt;a href=&#34;https://jamstack.org/generators/&#34;&gt;Jamstack lists&lt;/a&gt; 366 of them, while &lt;a href=&#34;https://staticsitegenerators.net/&#34;&gt;Static Site Generators&lt;/a&gt; counts nearly 500. Most have been abandoned, maybe because nobody was using them, or because the developer lost interest in continuing development. Let’s say the interesting ones are a dozen or so, maybe a few more.&lt;/p&gt;&#xA;&lt;p&gt;Among these, I considered &lt;a href=&#34;https://www.bridgetownrb.com/&#34;&gt;Bridgetown&lt;/a&gt; (very briefly, I admit), which &lt;a href=&#34;https://www.bridgetownrb.com/news/time-to-visit-bridgetown/&#34;&gt;is derived from Jekyll&lt;/a&gt; and therefore, at first glance, seemed like a natural evolution. However, I realised that few people use it, there are few plugins and even fewer themes. If Bridgetown is derived from Jekyll, how could I be sure that it didn’t suffer from the same slowness issue? Better to stay away and stick with the original.&lt;/p&gt;&#xA;&lt;p&gt;Another candidate was &lt;a href=&#34;https://middlemanapp.com/&#34;&gt;Middleman&lt;/a&gt;, which is developed in Ruby like Jekyll. But Middleman is designed to generate plain websites, and you need a specific extension to make it support typical blog features, such as lists, taxonomies, feeds and comments. Also, the &lt;em&gt;templating&lt;/em&gt; language is &lt;a href=&#34;https://github.com/ruby/erb&#34;&gt;ERB&lt;/a&gt; (Embedded Ruby), which is a sensible choice since it’s integrated within Ruby. However, it meant having to relearn everything from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Long story short: in the end, the only serious candidate was&amp;hellip; the good old &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;looking-for-speed&#34;&gt;Looking for speed&lt;/h4&gt;&#xA;&lt;p&gt;Many years ago, &lt;a href=&#34;https://melabit.com/it/2014/12/28/hugo-la-prova/&#34;&gt;I wrote a post about Hugo&lt;/a&gt;, finding it interesting, but crippled by documentation that calling &lt;em&gt;poor&lt;/em&gt; was being generous.&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;However, its quality is not in question. Unsurprisingly, Hugo consistently ranks at the top of all the charts evaluating the quality of static site generators, just like Jekyll.&lt;/p&gt;&#xA;&lt;p&gt;And Hugo has a real ace up its sleeve: it’s fast. In fact, it’s &lt;em&gt;blazingly fast&lt;/em&gt;!&lt;/p&gt;&#xA;&lt;p&gt;I can&amp;rsquo;t say whether Hugo is truly &lt;em&gt;the world’s fastest framework for building websites&lt;/em&gt;, as claimed in the &lt;a href=&#34;https://gohugo.io/&#34;&gt;slogan at the top of its homepage&lt;/a&gt;. However, I have verified firsthand that Hugo can generate this entire site in under a minute, 15 times faster than Jekyll. Most importantly, the generated site is fast and responsive, exactly as you would expect from a modern website. That puts everything else in the background.&lt;/p&gt;&#xA;&lt;h4 id=&#34;hugo&#34;&gt;Hugo&lt;/h4&gt;&#xA;&lt;p&gt;So starting today, &lt;a href=&#34;https://melabit.com/&#34;&gt;melabit.com&lt;/a&gt; is moving to Hugo, with a new design&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; and trying to keep all the features of the Jekyll-based version. The first of these is the [Comma-based commenting system]https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/), which after the transplant worked practically on the first try.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Permalink&#34;&gt;permalinks&lt;/a&gt; have changed and now explicitly indicate the language of the post, which is a more rational approach. The feed has changed too. For now it&amp;rsquo;s the old RSS, but at some point I’ll check whether it’s possible to add ATOM.&lt;/p&gt;&#xA;&lt;p&gt;Right now, the search function is based on Google, and will not work until the site is indexed again. Pagination needs to be revised, as does the logic that shows the featured post in the list of all posts. But these details can be sorted out later.&lt;/p&gt;&#xA;&lt;p&gt;Because of how my mind works, I’d love to go into the details of how I modified Hugo and the chosen theme, but I’m afraid it would be boring, in particular after all the very detailed (but now almost useless) posts I wrote about Jekyll. I’ll think it over. In the meantime, if anyone is interested in knowing more, feel free to say so in the comments.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-05-24-jeeeeeekyll-no-hugo/jekyll-vs-hugo.jpg&#34; alt=&#34;&#34;&gt;&#xA;&amp;ndash; &lt;em&gt;Image generated by &lt;a href=&#34;https://gemini.google.com&#34;&gt;Google Gemini&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;But you could at least distract yourself by watching the images appear one line at a time on the screen&amp;hellip; 😂&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Not much has changed since then. One of the (few) posts I can recommend without reservation is this one on managing &lt;a href=&#34;https://www.smashingmagazine.com/2021/02/context-variables-hugo-static-site-generator/&#34;&gt;context and variables in Hugo&lt;/a&gt;. It&amp;rsquo;s a very technical read, but essential for learning the basics needed to modify and extend Hugo.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not thrilled with the design, but it&amp;rsquo;s the best I&amp;rsquo;ve been able to come up with so far.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: hosting Jekyll</title>
      <link>https://melabit.com/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/</link>
      <pubDate>Tue, 18 Mar 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-03-18-da-melabit-a-melabit-jekyll-e-l-hosting/scott-rodgerson-PSpf_XgOM5w-unsplash.jpg&#34; alt=&#34;&#34;&gt;&#xA;&amp;ndash; &lt;em&gt;Source: &lt;a href=&#34;https://unsplash.com/@scottrodgerson&#34;&gt;Scott Rodgerson&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;As promised (or threatened?) in the &lt;a href=&#34;https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/&#34;&gt;last post&lt;/a&gt;, this post is dedicated to exploring the available options for &lt;em&gt;hosting&lt;/em&gt; a Jekyll-based website (or any other static site generator), whether for a personal blog like the one you&amp;rsquo;re reading, a professional studio, or a small business website.&lt;/p&gt;&#xA;&lt;p&gt;I could summarize this in two lines and only refer you to what I wrote 6–7 years ago (&lt;a href=&#34;https://melabit.wordpress.com/2019/06/18/da-melabit-a-melabit-fare-da-se/&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://melabit.wordpress.com/2018/05/21/da-melabit-a-melabit-la-scelta-dell-hosting/&#34;&gt;here&lt;/a&gt;), but so much time has passed that a proper update is needed.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;For those interested in reading the other installments of my transition from WordPress to Jekyll, below is the full list of posts that have been published:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/01/02/from-melabit-to-melabit-goodbye-wordpress-hello-jekyll/&#34;&gt;From melabit to melabit: goodbye WordPress, hello Jekyll&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/01/21/from-melabit-to-melabit-why-jekyll/&#34;&gt;From melabit to melabit: why Jekyll?&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/&#34;&gt;From melabit to melabit: Jekyll, installation and basic configuration&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/&#34;&gt;From melabit to melabit: developing a web site in Jekyll&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/&#34;&gt;From melabit to melabit: managing comments with Jekyll&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://melabit.com/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/&#34;&gt;From melabit to melabit: hosting Jekyll&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;h4 id=&#34;introduction&#34;&gt;Introduction&lt;/h4&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not a professional developer, I don&amp;rsquo;t know much about web development, and I consider myself just a hobbyist when it comes to server and network management.&lt;/p&gt;&#xA;&lt;p&gt;The thoughts shared below are purely personal reflections, shaped by years of experience and experimentation in managing computing systems &amp;ndash; some more complex than others &amp;ndash; and web services, both &lt;a href=&#34;https://melabit.wordpress.com&#34;&gt;still active&lt;/a&gt; and long gone (sadly, more than one). I hope these insights will be useful to anyone considering similar solutions, but those looking for professional answers should turn to someone with deeper expertise.&lt;/p&gt;&#xA;&lt;h4 id=&#34;why-using-a-mac-isnt-a-good-idea&#34;&gt;Why using a Mac isn&amp;rsquo;t a good idea&lt;/h4&gt;&#xA;&lt;p&gt;As I mentioned &lt;a href=&#34;https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/&#34;&gt;last time&lt;/a&gt;, I find it impractical to use a Mac as a web server for a Jekyll-based site (or, more generally, for &lt;em&gt;any&lt;/em&gt; website, whether static or dynamic).&lt;/p&gt;&#xA;&lt;p&gt;The reason is simple: for a site with moderate traffic, a Mac is overkill &amp;ndash; an unnecessary waste of resources.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;Development is a different story (I used a Mac for that myself). Having a UNIX-based system with a polished graphical interface, powerful yet user-friendly editors, and tools that streamline coding and debugging is invaluable.&lt;/p&gt;&#xA;&lt;p&gt;What about an old Mac lying around, why not repurpose it to serve my site?&lt;/p&gt;&#xA;&lt;p&gt;An old Mac is still great for writing, managing emails, browsing the web, video conferencing, making music, learning to code, and much more. Even better if you install a recent version of macOS using &lt;a href=&#34;https://melabit.com/en/2023/12/22/ridare-una-nuova-vita-al-vecchio-mac-con-opencore-legacy-patcher-prima-parte/&#34;&gt;Open Core Legacy Patcher&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But using an old computer as a server, keeping it on 24/7? Personally, I wouldn&amp;rsquo;t do it, it just doesn&amp;rsquo;t seem reliable enough. And even if you wanted to try, you&amp;rsquo;d run into the same broader issues I&amp;rsquo;ll discuss in the next section.&lt;/p&gt;&#xA;&lt;h4 id=&#34;why-doing-it-yourself-isnt-worth-it&#34;&gt;Why doing it yourself isn&amp;rsquo;t worth it&lt;/h4&gt;&#xA;&lt;p&gt;Instead of a Mac, we might consider using a PC, perhaps one of those slightly older but still capable mini-PCs, available for just over 100 euros, like the &lt;a href=&#34;https://www.ebay.it/sch/i.html?_nkw=lenovo&amp;#43;m95q&#34;&gt;Lenovo M95q&lt;/a&gt; or the &lt;a href=&#34;https://www.ebay.it/sch/i.html?_nkw=HP&amp;#43;800&amp;#43;g3&#34;&gt;HP 800 G3&lt;/a&gt;. Another option could be a &lt;a href=&#34;https://www.amazon.it/Raspberry-Pi-Quad-Core-ARMA76-Bits/dp/B0CK2FCG1K&#34;&gt;Raspberry Pi 5&lt;/a&gt;, though unfortunately, it&amp;rsquo;s no longer as budget-friendly as it used to be, at least if we plan to use it as a regular desktop computer.&lt;/p&gt;&#xA;&lt;p&gt;As I &lt;a href=&#34;https://melabit.com/en/2019/06/18/da-melabit-a-melabit-fare-da-se/&#34;&gt;mentioned years ago&lt;/a&gt;, once you install Linux on these mini-PCs, they become perfect &amp;ldquo;&lt;em&gt;for learning how to manage a web server and the associated Linux system, or for experimenting with different CMSs or static site generators before deciding which one to use for your website&lt;/em&gt;.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;You don&amp;rsquo;t even need to connect a keyboard and monitor, as everything can be done from the Terminal via &lt;code&gt;ssh&lt;/code&gt;. For those who prefer a graphical interface, remote access is easy with &lt;a href=&#34;https://remotedesktop.google.com&#34;&gt;Chrome Remote Desktop&lt;/a&gt; or with one of the many remote access services we&amp;rsquo;re all familiar with these days.&lt;/p&gt;&#xA;&lt;p&gt;But can we use these mini-PCs to run a &amp;ldquo;real&amp;rdquo; website, one that needs to be online 24/7?&lt;/p&gt;&#xA;&lt;p&gt;In my opinion, no.&lt;/p&gt;&#xA;&lt;p&gt;A website needs a fixed public IP address, and in Italy only Fastweb offers this for free, but under certain conditions. Other providers either don&amp;rsquo;t know what it is or require special contracts, which are of course more expensive than regular &amp;ldquo;home&amp;rdquo; or &amp;ldquo;business&amp;rdquo; plans.&lt;/p&gt;&#xA;&lt;p&gt;I know, there are &lt;a href=&#34;https://dyndns.it/&#34;&gt;dynamic DNS services&lt;/a&gt;. But the &amp;rsquo;90s are long gone, and today I would never trust my web services to a &lt;em&gt;volatile&lt;/em&gt; service with unpredictable IP update times. Besides, if you want any level of reliability, you&amp;rsquo;re going to have to pay for it. At this point, is it worth it?&lt;/p&gt;&#xA;&lt;p&gt;Another issue is sudden internet or power outages, perhaps due to street work or because your colleague or partner decided to turn on all the air conditioners at once or run the washing machine, oven, and hair dryer at the same time.&lt;/p&gt;&#xA;&lt;p&gt;Sure, there are UPS devices, but if we&amp;rsquo;re away from the office or home, even the UPS will eventually run out of power, and our server will shut down.&lt;/p&gt;&#xA;&lt;p&gt;And let&amp;rsquo;s not forget the security issue, the inevitable and constant attacks from countless idle youngsters with nothing better to do with their time. If we&amp;rsquo;re not already security experts, are we really willing to delve into matters far beyond our skill set?&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-is-worth-doing-yourself&#34;&gt;What is worth doing yourself&lt;/h4&gt;&#xA;&lt;p&gt;If you want to do it yourself, the best option is undoubtedly to use a virtual machine on one of the countless cloud services, from &lt;a href=&#34;https://upcloud.com/&#34;&gt;UpCloud&lt;/a&gt; to &lt;a href=&#34;https://www.digitalocean.com/&#34;&gt;Digital Ocean&lt;/a&gt;, or &lt;a href=&#34;https://www.heroku.com/&#34;&gt;Heroku&lt;/a&gt; and &lt;a href=&#34;https://www.linode.com/&#34;&gt;Linode&lt;/a&gt; (now Akamai Cloud), not forgetting the big players like &lt;a href=&#34;https://aws.amazon.com/it/what-is-aws/&#34;&gt;Amazon AWS&lt;/a&gt; and &lt;a href=&#34;https://cloud.google.com&#34;&gt;Google Cloud&lt;/a&gt; (and yes, there&amp;rsquo;s also &lt;a href=&#34;https://azure.microsoft.com&#34;&gt;Microsoft Azure&lt;/a&gt;). If you&amp;rsquo;re hesitant to &lt;em&gt;buy American&lt;/em&gt; right now, here&amp;rsquo;s a list of &lt;a href=&#34;https://european-alternatives.eu/category/cloud-computing-platforms&#34;&gt;European cloud providers&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A virtual machine on the cloud is inexpensive and doesn&amp;rsquo;t have any of the drawbacks listed so far, except for the security issue, which, however, is at least partially managed by the service provider itself.&lt;/p&gt;&#xA;&lt;p&gt;Even more secure, and completely free, is to use services like &lt;a href=&#34;https://jekyllrb.com/docs/github-pages/&#34;&gt;GitHub Pages&lt;/a&gt;, which automatically regenerates and publishes the site on &lt;code&gt;github.io&lt;/code&gt; every time a linked Jekyll-based repository is updated. The &lt;a href=&#34;https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll&#34;&gt;related documentation&lt;/a&gt; is very detailed, so there&amp;rsquo;s no need for me to add anything further.&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-i-have-done&#34;&gt;What I have done&lt;/h4&gt;&#xA;&lt;p&gt;I am a user like many others, and the solution I have adopted can be a good example of how to manage web hosting efficiently and relatively cheaply (which is always a plus), without compromising on service quality.&lt;/p&gt;&#xA;&lt;p&gt;This site is hosted by &lt;a href=&#34;https://shockhosting.com/&#34;&gt;Shock Hosting&lt;/a&gt;, a hosting service I have been using for years, with a great support service. Actually, I&amp;rsquo;ve had very few problems over the years, and they&amp;rsquo;ve always been minor, like paying a bill twice by mistake, but every time the support response couldn&amp;rsquo;t have been faster.&lt;/p&gt;&#xA;&lt;p&gt;The basic &amp;ldquo;Low Shock&amp;rdquo; plan at $2.99 per month offers unlimited disk space and data transfer, with no artificial speed limits (which few competitors offer). This plan is more than sufficient for a static site, but also for a site based on WordPress or other CMSs (based on my direct experience). The higher plans are identical to the basic one but allow hosting more domains, and switching between plans only requires opening a ticket and a short wait.&lt;/p&gt;&#xA;&lt;p&gt;The domain name is also managed by Shock Hosting and costs 12 dollars per year (one dollar per month), which is the standard cost for a &lt;code&gt;.com&lt;/code&gt; domain.&lt;/p&gt;&#xA;&lt;p&gt;Of course, &lt;a href=&#34;https://shockhosting.com/&#34;&gt;Shock Hosting&lt;/a&gt; is just one of countless hosting services available, although I find it hard to beat in terms of price/quality ratio. In any case, before making a choice, I recommend paying close attention to the terms of service, as most providers impose more or less strict limits on disk space or data transfer. Others may offer very attractive prices for the &lt;a href=&#34;https://www.hostgator.com/web-hosting&#34;&gt;first year&lt;/a&gt; or the &lt;a href=&#34;https://www.dreamhost.com/hosting/shared/#shared-plans&#34;&gt;first few months&lt;/a&gt;, only to raise them significantly later. If you can test how their support works before committing, that&amp;rsquo;s a big plus.&lt;/p&gt;&#xA;&lt;p&gt;Otherwise, choose a service that allows you to pay monthly or quarterly so you can carefully evaluate whether it meets your needs. You can always choose to pay at longer intervals later on.&lt;/p&gt;&#xA;&lt;p&gt;Avoid like the plague those services that offer massive discounts if you commit for two, three, or more years, or even for&amp;hellip; eternity. Nothing on the internet lasts forever; in fact, the so-called &lt;em&gt;eternal&lt;/em&gt; services are often the first to disappear. And if that happens, you&amp;rsquo;ll ve lost everything you paid for in advance, so much for saving money!&lt;/p&gt;&#xA;&lt;p&gt;The hosting service alone is not enough for &lt;a href=&#34;https://melabit.com/posts/en&#34;&gt;melabit.com/posts/en&lt;/a&gt; because it doesn&amp;rsquo;t support running &lt;code&gt;comma&lt;/code&gt; to manage comments. The simplest solution would have been to switch to a virtual server, still on &lt;a href=&#34;https://shockhosting.com/vps&#34;&gt;Shock Hosting&lt;/a&gt;, but I don&amp;rsquo;t like simple solutions. Besides, the hosting service offers several advantages that I didn&amp;rsquo;t want to give up: it handles web server management and site security, performs backups, renews the SSL certificate, provides analytics, and much more. All of this is worth far more than the few euros per month it costs.&lt;/p&gt;&#xA;&lt;p&gt;Just as I was thinking about what to do, I came across &lt;a href=&#34;https://talkpython.fm/blog/posts/we-have-moved-to-hetzner/&#34;&gt;this post&lt;/a&gt;, and I decided to give the &lt;em&gt;German kitchen&lt;/em&gt; a try by purchasing a virtual server from &lt;a href=&#34;https://www.hetzner.com/&#34;&gt;Hetzner&lt;/a&gt;. To run &lt;code&gt;comma&lt;/code&gt;, the base CX22 plan is more than enough. For less than 5 euros per month, it offers a machine equivalent to the base plan from &lt;a href=&#34;https://shockhosting.com/vps&#34;&gt;Shock Hosting&lt;/a&gt;, which costs twice as much. The virtual machine is powerful enough that I can also generate the site on it and then transfer the result to Shock Hosting using &lt;code&gt;rsync&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When I chose Hetzner, the ongoing trade war between the U.S. and Europe was only in the minds of the gods, but in hindsight, it turned out to be a wise decision. If I ever lost access to my US-based hosting service or if the cost became prohibitive for a European, it would take very little effort to move everything to a safer location. Bye bye, USA.&lt;/p&gt;&#xA;&lt;h4 id=&#34;lets-do-the-math&#34;&gt;Let&amp;rsquo;s do the math&lt;/h4&gt;&#xA;&lt;p&gt;In this post, I&amp;rsquo;ve written about why I don&amp;rsquo;t think it&amp;rsquo;s worth it to run a website on either a Mac or a PC. But is it at least economically viable to do so?&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start by calculating how much I spend per month for &lt;a href=&#34;https://melabit.com/posts/en&#34;&gt;melabit.com/posts/en&lt;/a&gt;. Hosting costs me 3 euros, and the virtual server costs 5 euros. That&amp;rsquo;s a total of 8 euros per month, which adds up to 96 euros per year. I should also add the cost of the domain, but that has to be paid anyway, so I&amp;rsquo;ll leave it out.&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s assume I&amp;rsquo;m stubborn and insist on using a mini PC or a Raspberry Pi to manage my site. Say the barebones computer costs around 100-120 euros. Then, I need to add a decent SSD and a sufficient amount of RAM, which adds at least another 60-100 euros (for the Raspberry Pi, the RAM is fixed and can&amp;rsquo;t be upgraded, but instead, I&amp;rsquo;d need to buy a case, a power supply, a practically mandatory heatsink, and an NVMe SSD adapter, again totaling about 100 euros).&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; Then, I&amp;rsquo;d also need a UPS, which will add another 100 euros.&lt;/p&gt;&#xA;&lt;p&gt;The total comes to about 300 euros (give or take 30-40 euros), roughly the same as what I spend in three years. But there&amp;rsquo;s no guarantee that a mini PC, or even worse, a Raspberry Pi, will last three years of uninterrupted use. Maybe today the fan breaks, tomorrow the power supply, the SSD starts acting up, or the UPS batteries die. In short, even financially, it&amp;rsquo;s not really worth it.&lt;/p&gt;&#xA;&lt;p&gt;Trust me, the cloud is much, much better.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;In theory, you could dedicate an entire Mac to a website that gets a lot of traffic. But in this case, you need a truly professional solution; doing it yourself is not an option.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Staying close to the lower limit of 160 euros seems really difficult to me.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: managing comments with Jekyll</title>
      <link>https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/</link>
      <pubDate>Wed, 05 Mar 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/</guid>
      <description>&lt;p&gt;As  noted in the &lt;a href=&#34;https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/&#34;&gt;last post&lt;/a&gt;, Jekyll does not have a built-in commenting system, but its themes often allow comments to be managed by connecting to third-party services such as &lt;a href=&#34;https://disqus.com/&#34;&gt;Disqus&lt;/a&gt; and similar platforms.&lt;/p&gt;&#xA;&lt;p&gt;The problem with these services is that they can stop working overnight (as happened last year with &lt;a href=&#34;https://web.archive.org/web/20240331055510/https://muut.com/&#34;&gt;Muut&lt;/a&gt;, which no longer even has a website), or they have opaque usage policies and user data collection practices.&lt;/p&gt;&#xA;&lt;p&gt;Another issue, which is far from negligible, is that most of these services require users to register before they can comment. Registration is useful for filtering inappropriate comments or spam, but it also acts as a barrier for casual readers who just want to share their thoughts.&lt;/p&gt;&#xA;&lt;p&gt;Then there is the problem of cost. Some comment management services are paid and not exactly cheap, take &lt;a href=&#34;https://talk.hyvor.com/&#34;&gt;Hyvor Talk&lt;/a&gt; as an example, which costs 12 euros per month. A price that is more than reasonable for a professional site or a small business that wants to interact with its users &amp;ndash; especially since these services often also handle newsletters and other promotional materials &amp;ndash; but that is completely out of scale for a toy handmade blog like this one.&lt;/p&gt;&#xA;&lt;h4 id=&#34;looking-for-the-ideal-commenting-system&#34;&gt;Looking for the ideal commenting system&lt;/h4&gt;&#xA;&lt;p&gt;My interest in comment-related issues began a year ago when, after the sudden shutdown of Muut, I observed the enormous work being done behind the scenes by &lt;a href=&#34;https://muloblog.netlify.app/&#34;&gt;Mimmo&lt;/a&gt;, MacMomo, and Paoloo to recover from Muut all the comments from &lt;a href=&#34;https://macintelligence.org/post/2024-04-01-tra-nuova-vita-e-pesce-d-aprile/&#34;&gt;Quickloox&lt;/a&gt; &amp;ndash; one of the must-read blogs for anyone interested in Apple, Macs, and related topics &amp;ndash; convert them to the format of the new commenting engine, and &lt;a href=&#34;https://macintelligence.org/post/2024-04-06-caratteri-difficili/&#34;&gt;reinsert them neatly into the blog&lt;/a&gt;.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;A few months later, I began working on my own &lt;a href=&#34;https://melabit.com/en/2025/01/02/da-melabit-a-melabit-addio-wordpress-ciao-jekyll/&#34;&gt;transition from WordPress to a Jekyll&lt;/a&gt;, and the commenting system was one of the main problems to solve. With WordPress, this isn&amp;rsquo;t an issue, because comments are integrated and stored in the site&amp;rsquo;s database along with the text of the post. But with a static site, like the one generated by Jekyll, it is necessary to implement some mechanism to add comments, which by their very nature are dynamic objects.&lt;/p&gt;&#xA;&lt;p&gt;In hindsight, I could have followed &lt;a href=&#34;https://muloblog.netlify.app/post/2024-03-09-comma-commentare/&#34;&gt;Mimmo&amp;rsquo;s advice&lt;/a&gt; and chosen &lt;a href=&#34;https://github.com/Dieterbe/comma&#34;&gt;Comma&lt;/a&gt; from the beginning. But coming from WordPress, using a database seemed like the most natural approach.&lt;/p&gt;&#xA;&lt;p&gt;So I tried &lt;a href=&#34;https://cusdis.com/&#34;&gt;Cusdis&lt;/a&gt;, &lt;a href=&#34;https://commento.io/&#34;&gt;Commento&lt;/a&gt;, &lt;a href=&#34;https://github.com/souramoo/commentoplusplus&#34;&gt;Commento++&lt;/a&gt;, &lt;a href=&#34;https://remark42.com/&#34;&gt;Remark42&lt;/a&gt;, and &lt;a href=&#34;https://github.com/zoomment&#34;&gt;Zooment&lt;/a&gt;, all database-based commenting systems.&lt;sup id=&#34;fnref1:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; I carefully followed the instructions step by step, I used Docker, I ran Linux virtual machines on the cloud, I tested services that are supposed to handle everything automatically, like &lt;a href=&#34;https://railway.app/&#34;&gt;Railway&lt;/a&gt; and &lt;a href=&#34;https://vercel.com/&#34;&gt;Vercel&lt;/a&gt;. Nothing worked. There wasn&amp;rsquo;t a single commenting system that worked like it should!!&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;I also ruled out all systems that rely on GitHub, such as &lt;a href=&#34;https://github.com/giscus/giscus&#34;&gt;Giscus&lt;/a&gt;, &lt;a href=&#34;https://staticman.net/&#34;&gt;Staticman&lt;/a&gt;, or &lt;a href=&#34;https://github.com/utterance/utterances&#34;&gt;utterances&lt;/a&gt;. These are perfect for developers who already have a GitHub account, but impractical for casual readers who would be forced to create yet another unnecessary account. That left only one option. &lt;a href=&#34;https://github.com/Dieterbe/comma&#34;&gt;Comma&lt;/a&gt;, of course.&lt;/p&gt;&#xA;&lt;h4 id=&#34;working-on-comma&#34;&gt;Working on Comma&lt;/h4&gt;&#xA;&lt;p&gt;And Comma it was. Comma is written in Go and is distributed only as source code. To compile it, we need a compiler for the &lt;a href=&#34;https://go.dev/&#34;&gt;Go language&lt;/a&gt;. On a Mac, the compiler can be installed by downloading the &lt;a href=&#34;https://go.dev/doc/install&#34;&gt;prepackaged package&lt;/a&gt; and following the instructions, or via the usual &lt;a href=&#34;https://brew.sh/&#34;&gt;Homebrew&lt;/a&gt; with&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ brew install golang&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Similarly, on Linux, Go can be installed by downloading a &lt;a href=&#34;https://go.dev/doc/install&#34;&gt;compressed file&lt;/a&gt; and extracting it into the &lt;code&gt;usr/local&lt;/code&gt; directory, or using the package manager commands of our distribution,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt install golang&#xA;$ sudo dnf install golang&#xA;$ sudo pacman -S go&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;depending on whether we are using Debian/Ubuntu, Fedora/CentOS, Arch, or one of their countless derivatives.&lt;/p&gt;&#xA;&lt;p&gt;Once Go is installed, compiling Comma is a matter of seconds,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git clone https://github.com/Dieterbe/comma.git&#xA;$ cd comma/src&#xA;$ go build&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;where the last command checks that the program compiles correctly. If everything is fine, we can run&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ go install .&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which compiles the source code and installs the &lt;code&gt;comma&lt;/code&gt; executable in &lt;code&gt;~/go/bin/&lt;/code&gt; (as usual, the &lt;code&gt;~&lt;/code&gt; represents the &lt;code&gt;Home&lt;/code&gt; directory of the account we are using).&lt;/p&gt;&#xA;&lt;p&gt;Before cloning the Comma repository, I made a &lt;a href=&#34;https://github.com/sabinomaggi/comma&#34;&gt;fork in my personal account&lt;/a&gt;, but only because I wanted to tweak a bit the code a bit.&lt;/p&gt;&#xA;&lt;p&gt;The first thing I did was to change the filename extension of the comments from &lt;code&gt;.cmt&lt;/code&gt; to &lt;code&gt;.xml&lt;/code&gt; (lines 67 and 105 of my &lt;code&gt;comment.go&lt;/code&gt; file). Comma comments are stored as &lt;a href=&#34;https://en.wikipedia.org/wiki/XML&#34;&gt;XML files&lt;/a&gt;, and there was no reason to use a non-standard extension. Also, this change makes it easier to open them with a text editor, which will automatically format them for better readability. A small convenience, but very useful during development. To further improve readability, I also added four spaces before each XML tag (lines 71-73 of &lt;code&gt;comment.go&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Lastly, I removed the requirement to enter an email address when submitting a comment (lines 94-96 of &lt;code&gt;main.go&lt;/code&gt;). My goal was to have a site free of any form of user tracking, thus avoiding many &lt;a href=&#34;https://school-of-scrap.com/2018/come-sistemare-il-blog-per-gdpr-se-sei-solo-una-blogger-bloggerperlavoroconpassione/&#34;&gt;headaches related to GDPR compliance&lt;/a&gt;.&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; In theory, this could pose some security risks, but do we really think that someone with malicious intent would enter their real email address?&lt;/p&gt;&#xA;&lt;p&gt;For the frontend &amp;ndash; i.e., how the user sees his new comment as well as the list of previous comments &amp;ndash; I used most of the &lt;a href=&#34;https://github.com/Dieterbe/dieterblog/blob/master/layouts/partials/comments.html&#34;&gt;original code&lt;/a&gt; from the author of Comma, adapting it to work with Jekyll. To that I added Markdown support and filtering of potentially malicious code from comments. For these two features, I &lt;a href=&#34;https://gitlab.com/emeralit/quickloox-contest/-/blob/main/blog-v4/layouts/partials/comments.html&#34;&gt;took a lot of inspiration&lt;/a&gt; from the code that by Mimmo, MacMomo, and Paoloo wrote for Quickloox.&lt;/p&gt;&#xA;&lt;p&gt;As for the icons associated with each commenter, I chose to generate them with &lt;a href=&#34;https://jdenticon.com/&#34;&gt;Jdenticon&lt;/a&gt;, probably because its symmetrical geometric patterns fit my personality better.&lt;/p&gt;&#xA;&lt;p&gt;The final appearance of the comments seems quite pleasant and well integrated with the rest of the site, and the localization works well, even in small details like the more prominent thin line under &amp;ldquo;Add a comment,&amp;rdquo; that changes depending on whether the text is in Italian or in English.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-03-05-da-melabit-a-melabit-gestire-i-commenti-con-jekyll/form-di-commento.png&#34; alt=&#34;&#34;&gt;&lt;br&gt;&#xA;&lt;img src=&#34;https://melabit.com/img/2025-03-05-da-melabit-a-melabit-gestire-i-commenti-con-jekyll/comment-form.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;All the frontend code is in &lt;code&gt;_includes/custom/comma-comments.html&lt;/code&gt;. While I was at it, I also added a small JavaScript function to the post page (&lt;code&gt;_layouts/post.html&lt;/code&gt;) that allows users to jump back to the top of the post with a single click. I originally needed it during development, but I believe it could be useful for readers as well, so I left it in the final code.&lt;/p&gt;&#xA;&lt;h4 id=&#34;putting-all-together&#34;&gt;Putting all together&lt;/h4&gt;&#xA;&lt;p&gt;Once the comment system and the code to display them on the site are ready, we need to make everything work together. First, we need to create a folder to store all the comments,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd&#xA;$ mkdir ~/comments&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and start Comma manually,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ~/go/bin/comma ~/comments localhost:5888&#xA;$ &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;telling it it to listen for new comments on port &lt;code&gt;5888&lt;/code&gt; of the local computer &lt;code&gt;localhost&lt;/code&gt; and save them in the &lt;code&gt;~/comments&lt;/code&gt; folder. The last step is to add a line to &lt;code&gt;_config.yml&lt;/code&gt; to connect Jekyll to the comment server&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#--- Comma comments ---&#xA;commentserver: http://localhost:5888&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and everything should work on the first try.&lt;/p&gt;&#xA;&lt;p&gt;If instead of a physical computer we are using a cloud virtual machine, we will need to replace &lt;code&gt;localhost&lt;/code&gt; with the machine&amp;rsquo;s &lt;code&gt;reverse DNS name&lt;/code&gt; (see the &lt;a href=&#34;https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/&#34;&gt;previous post&lt;/a&gt;). However, the exact steps depend on the service we are using, so I can&amp;rsquo;t be more specific.&lt;/p&gt;&#xA;&lt;p&gt;On a real site, things get a bit more complex, for example, because one needs to use the secure &lt;code&gt;https:&lt;/code&gt; protocol instead of simple &lt;code&gt;http:&lt;/code&gt;, which requires proper web server configuration. But again, the details depend on the web server, the configuration of installed services, and so on, making it impossible to explain everything without writing a whole manual.&lt;/p&gt;&#xA;&lt;p&gt;However, I can say for sure that a real website requires Comma to be started automatically, just like the web server that manages the site.&lt;/p&gt;&#xA;&lt;p&gt;Assuming that the site is running on a Linux server (in the next post, I will explain why using a Mac as a web server doesn&amp;rsquo;t make much sense) and that Comma was installed by the user &lt;code&gt;webuser&lt;/code&gt;, in order to start Comma automatically on every system reboot (as well as when the program stops unexpectedly), we need to run&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd /etc/systemd/system&#xA;$ sudo touch comma.service&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which creates an empty configuration file called &lt;code&gt;comma.service&lt;/code&gt;. We need to add the following lines to this file,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Unit]&#xA;Description=comma backend server&#xA;After=network-online.target&#xA;Wants=network-online.target&#xA;&#xA;[Service]&#xA;ExecStart=/home/webuser/go/bin/comma /home/webuser/comments :5888&#xA;Restart=always&#xA;RestartSec=1&#xA;User=webuser&#xA;Group=webuser&#xA;&#xA;[Install]&#xA;WantedBy=graphical.target&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;making sure to replace &lt;code&gt;webuser&lt;/code&gt; with the actual username of the user who installed Comma. Running,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo systemctl enable comma&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;activates the automatic startup mechanism, allowing us to almost forget about Comma&amp;rsquo;s existence. To manually interact with the service, we can use the following commands,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo systemctl status comma&#xA;$ sudo systemctl stop comma&#xA;$ sudo systemctl start comma&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which are useful for checking the status of the service or manually stopping and restarting it. These commands are particularly useful during debugging, but can also be helpful in production, so it&amp;rsquo;s good to know they exist.&lt;/p&gt;&#xA;&lt;h4 id=&#34;conclusions&#34;&gt;Conclusions&lt;/h4&gt;&#xA;&lt;p&gt;I had originally planned to end this long journey through the technical description of the new site here. However, while writing this post, I realized that a few words about hosting might be useful. And that will be the subject of the &lt;a href=&#34;https://melabit.com/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/&#34;&gt;next post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;And not even a &lt;em&gt;small&lt;/em&gt; database like &lt;a href=&#34;https://www.sqlite.org/&#34;&gt;SQLite&lt;/a&gt;! All these comment systems use heavyweights like &lt;a href=&#34;https://mariadb.org/&#34;&gt;MariaDB&lt;/a&gt; or &lt;a href=&#34;https://www.postgresql.org/&#34;&gt;PosgreSQL&lt;/a&gt;.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&amp;#160;&lt;a href=&#34;#fnref1:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;If I were mean, I might think the instructions were wrong on purpose to push me to use their paid cloud solutions. But I am a good guy.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;I have nothing against GDPR. In fact, I think it is a very useful regulation, at least in theory. In practice, however, it does little to &lt;a href=&#34;https://www.laleggepertutti.it/207857_gdpr-il-paradosso-della-nuova-legge-sulla-privacy&#34;&gt;truly protect user privacy&lt;/a&gt; and ultimately becomes a not-so-useful bureaucratic burden.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: developing a web site in Jekyll</title>
      <link>https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/</link>
      <pubDate>Sat, 01 Mar 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/</guid>
      <description>&lt;p&gt;After the &lt;a href=&#34;https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/&#34;&gt;first part&lt;/a&gt; dedicated to installing and configuring Jekyll, this second part of these annotated notes dives into developing a Jekyll site using a pre-existing theme. On the other hand, developing a theme for Jekyll from scratch is far beyond my expertise, but those who can do it don&amp;rsquo;t need to read these notes.&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-do-we-want&#34;&gt;What do we want?&lt;/h4&gt;&#xA;&lt;p&gt;First, we need to have a clear idea of what the site should look like graphically and what features it should support. Do we want a personal blog with a simple list of posts? Do we want a more elaborate magazine-style site? Do we need a showcase site to present our business or a specific project? Do we want a photography or documentation site?&lt;/p&gt;&#xA;&lt;p&gt;Once we&amp;rsquo;ve clarified the site&amp;rsquo;s &amp;ldquo;specifications,&amp;rdquo; we can look for the Jekyll themes in &lt;a href=&#34;http://jekyllthemes.org/&#34;&gt;this site&lt;/a&gt; for Jekyll, or &lt;a href=&#34;https://jekyll-themes.com/&#34;&gt;here&lt;/a&gt;, &lt;a href=&#34;https://jekyllthemes.io/&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://jamstackthemes.dev/ssg/jekyll&#34;&gt;here&lt;/a&gt; (I can&amp;rsquo;t tell them apart by name because they are all called Jekyll Themes). The most patient among us can go through the themes one by one, while others may prefer to filter by the type of site they’re interested in and only look at those themes. In any case, it’s good to take note of the themes we like the most and try out the demo sites, when available. It’s useful to keep an open mind &amp;ndash; we could  find an interesting theme that doesn’t fit our original specifications, and it&amp;rsquo;s worth noting that down, too.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;how-a-theme-is-structured&#34;&gt;How a theme is structured&lt;/h4&gt;&#xA;&lt;p&gt;Now, it’s time to try some theme out. To avoid being too generic, I&amp;rsquo;ll describe the installation of the &lt;a href=&#34;https://github.com/wowthemesnet/mundana-theme-jekyll&#34;&gt;Mundana&lt;/a&gt; theme which, &lt;em&gt;coincidentally&lt;/em&gt;, is the one I used for &lt;a href=&#34;https://melabit.com/posts/en&#34;&gt;melabit.com/posts/en&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Like Mundana, most Jekyll themes that are not &lt;em&gt;gem-based&lt;/em&gt; are installed by cloning their GitHub repository or downloading a compressed file (in which case, all the following parts related to &lt;code&gt;git&lt;/code&gt; can be skipped). In both cases, what we install is both the theme and the actual site because, in Jekyll, there is no strict separation between design and content.&lt;/p&gt;&#xA;&lt;p&gt;The first thing to do is install &lt;code&gt;git&lt;/code&gt; on the computer. On macOS, it comes preinstalled, but it’s usually an outdated version, and as I &lt;a href=&#34;https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/&#34;&gt;mentioned last time&lt;/a&gt;, it’s always better to keep system tools separate from development tools. With &lt;a href=&#34;https://melabit.com/en/2014/04/29/homebrew-software-per-il-mac-fatto-in-casa/&#34;&gt;Homebrew&lt;/a&gt;, installing the latest (or nearly latest) version of &lt;code&gt;git&lt;/code&gt; on the Mac is a matter of seconds,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ brew install git&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On Linux, the process is similar, but this time we must use the package manager of our distribution. This means we need to execute one of the following commands,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt install git&#xA;$ sudo dnf install git&#xA;$ sudo pacman -S git&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;depending on whether we use Debian/Ubuntu, Fedora/CentOS, Arch, or one of their many derivatives.&lt;/p&gt;&#xA;&lt;p&gt;As already mentioned, installing Mundana is done by cloning its repository,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git clone https://github.com/wowthemesnet/mundana-theme-jekyll.git&#xA;Cloning into &amp;#39;mundana-theme-jekyll&amp;#39;...&#xA;remote: Enumerating objects: 324, done.&#xA;remote: Total 324 (delta 0), reused 0 (delta 0), pack-reused 324 (from 1)&#xA;Receiving objects: 100% (324/324), 4.12 MiB | 24.52 MiB/s, done.&#xA;Resolving deltas: 100% (116/116), done.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;or by downloading and extracting the project&amp;rsquo;s &lt;code&gt;zip&lt;/code&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;The developers suggest making first a &lt;em&gt;fork&lt;/em&gt; on our GitHub account and then cloning from there. This makes sense if we plan to contribute to the code; otherwise, it seems like an unnecessary step. Anyway, those who know what a &lt;em&gt;fork&lt;/em&gt; is don’t need further instructions.&lt;/p&gt;&#xA;&lt;p&gt;Once the installation is complete, we can navigate to the Mundana directory and explore a bit (for clarity, all directory names end with a &lt;code&gt;/&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd  mundana-theme-jekyll&#xA;% ls -nhp&#xA;total 72&#xA;-rw-r--r--   1 501  20   398B Feb 12T19:58:00 404.html&#xA;-rw-r--r--   1 501  20   510B Feb 12T19:58:00 Gemfile&#xA;-rw-r--r--   1 501  20   1.7K Feb 12T19:58:00 Gemfile.lock&#xA;-rw-r--r--   1 501  20   2.0K Feb 12T19:58:00 README.md&#xA;-rw-r--r--   1 501  20   1.7K Feb 12T19:58:00 _config.yml&#xA;drwxr-xr-x  11 501  20   352B Feb 12T19:58:00 _includes/&#xA;drwxr-xr-x   6 501  20   192B Feb 12T19:58:00 _layouts/&#xA;drwxr-xr-x  11 501  20   352B Feb 12T19:58:00 _pages/&#xA;drwxr-xr-x  20 501  20   640B Feb 12T19:58:00 _posts/&#xA;drwxr-xr-x   5 501  20   160B Feb 12T19:58:00 assets/&#xA;-rw-r--r--   1 501  20   149B Feb 12T19:58:00 docker-compose.yml&#xA;-rw-r--r--   1 501  20   9.2K Feb 12T19:58:00 index.html&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The Mundana directory contains two &lt;em&gt;service&lt;/em&gt; files for &lt;code&gt;RubyGems&lt;/code&gt;, &lt;code&gt;Gemfile&lt;/code&gt; and &lt;code&gt;Gemfile.lock&lt;/code&gt;, as well as the &lt;code&gt;docker-compose.yml&lt;/code&gt; file, which is only needed if we run Jekyll inside a Docker container (which is not relevant here). Everything else is related to Jekyll.&lt;/p&gt;&#xA;&lt;p&gt;Static pages go into the &lt;code&gt;_pages&lt;/code&gt; folder, while all the more dynamic content, such as the blog posts that are updated more frequently, goes into the &lt;code&gt;_posts&lt;/code&gt; folder. The content of static pages and posts can be written in either &lt;code&gt;HTML&lt;/code&gt; or &lt;code&gt;Markdown&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;_layouts&lt;/code&gt; folder contains files that generate the main parts of the site, such as static pages, blog post templates, or sidebars, while the &lt;code&gt;_includes&lt;/code&gt; folder contains snippets of code that can be included in other pages, more or less like library functions.&lt;/p&gt;&#xA;&lt;p&gt;These four folders, all prefixed with an underscore &lt;code&gt;_&lt;/code&gt;, are processed by the Jekyll engine, which uses them to generate the actual &lt;code&gt;HTML&lt;/code&gt; pages for the static site.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;assets&lt;/code&gt; folder, on the other hand, holds site content that Jekyll does not process, such as the &lt;code&gt;CSS&lt;/code&gt; files that define the site&amp;rsquo;s design, the &lt;code&gt;JavaScript&lt;/code&gt; files for interactive features,&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; and all site images. When Jekyll generates a site, this folder is copied as is, and the system automatically creates links to the various files.&lt;/p&gt;&#xA;&lt;p&gt;Finally, the &lt;code&gt;_config.yml&lt;/code&gt; file contains all the site configuration parameters, such as the site name and description, the links to the site&amp;rsquo;s logo and favicon, the required plugins, the pagination settings, and a list of files and service folders that Jekyll should ignore. The &lt;code&gt;_config.yml&lt;/code&gt; file can become quite long and complex, so for simplicity, here’s just a small portion of the default &lt;code&gt;_config.yml&lt;/code&gt; file for Mundana.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Site&#xA;name: &amp;#39;Mundana&amp;#39;&#xA;description: &amp;#39;Mundana is a free Jekyll theme for awesome people like you, Medium like.&amp;#39;&#xA;logo: &amp;#39;assets/images/logo.png&amp;#39;&#xA;favicon: &amp;#39;assets/images/favicon.ico&amp;#39;&#xA;baseurl: &amp;#39;/mundana-theme-jekyll&amp;#39;&#xA;&#xA;[...]&#xA;&#xA;# Plugins&#xA;plugins: &#xA;  - jekyll-feed&#xA;  - jekyll-sitemap&#xA;  - jekyll-paginate&#xA;  - jekyll-seo-tag&#xA;  &#xA;[...]&#xA;&#xA;# Paginate&#xA;paginate: 10&#xA;&#xA;# Exclude metadata and development time dependencies (like Grunt plugins)&#xA;exclude: [README.markdown, package.json, grunt.js, Gruntfile.js, Gruntfile.coffee, node_modules]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Since we&amp;rsquo;re at it, let&amp;rsquo;s make our future work easier with a small modification to the &lt;code&gt;_config.yml&lt;/code&gt; file, replacing the line &lt;code&gt;baseurl: &#39;/mundana-theme-jekyll&#39;&lt;/code&gt; with &lt;code&gt;baseurl: &#39;&#39;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Almost forgot: plugins (and their dependencies) are also &lt;a href=&#34;https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/&#34;&gt;&lt;em&gt;Ruby gems&lt;/em&gt;&lt;/a&gt; and are not installed by default, so we need to install them. First run&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ rm Gemfile.lock&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;to prevent conflicts between plugin versions listed in the &lt;code&gt;Gemfile.lock&lt;/code&gt; file and newer versions that Ruby suggests to install. After that, run&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ bundle install&#xA;[...]&#xA;Fetching gem metadata from https://rubygems.org/............&#xA;Resolving dependencies...&#xA;Fetching jekyll-paginate 1.1.0&#xA;Installing jekyll-paginate 1.1.0&#xA;Fetching jekyll-sitemap 1.4.0&#xA;Installing jekyll-sitemap 1.4.0&#xA;Bundle complete! 4 Gemfile dependencies, 39 gems now installed.&#xA;Bundled gems are installed into `[...]/.gems`&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;that installs the actual plugins (and automatically regenerates the &lt;code&gt;Gemfile.lock&lt;/code&gt; file with the newly installed versions of the plugins).&lt;/p&gt;&#xA;&lt;h4 id=&#34;testing-jekyll-again&#34;&gt;Testing Jekyll again&lt;/h4&gt;&#xA;&lt;p&gt;All that is left now is to test Jekyll again, this time with the theme we just installed.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ bundle exec jekyll serve --host=0.0.0.0&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The site will be quickly regenerated and will be available on our real machine at the URL &lt;code&gt;http://localhost:4000&lt;/code&gt;. If we are using a virtual machine or a cloud server the port will still be &lt;code&gt;:4000&lt;/code&gt;, but the URL will depend on the configuration of the machine (for cloud servers, the URL usually has a label like &lt;code&gt;reverse DNS name&lt;/code&gt; or something similar).&lt;/p&gt;&#xA;&lt;img src=&#34;https://melabit.com/img/2025-03-01-da-melabit-a-melabit-sviluppare-un-sito-in-Jekyll/jekyll-mundana-default.png&#34; alt=&#34;&#34;&gt;&lt;p&gt;Compared to the simple &lt;em&gt;gem-based&lt;/em&gt; themes &lt;a href=&#34;https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/&#34;&gt;covered in the previous post&lt;/a&gt;, Mundana is clearly on a different level. At the top of the page are the four most recent posts, along with their images. In the center, a featured post is prominently highlighted against a contrasting background (for example, it could be the most recently published post). Below that, all other posts are arranged in reverse chronological order. On the side, a sidebar contains posts that we want to highlight.&lt;/p&gt;&#xA;&lt;p&gt;If we replace Mundana&amp;rsquo;s default posts with our own, add the images, make two or three modifications to the &lt;code&gt;_config.yml&lt;/code&gt; file, and within minutes we could have a site ready to go online, with all the posts neatly organized into well-structured pages (&lt;a href=&#34;https://melabit.com/img/2025-03-01-da-melabit-a-melabit-sviluppare-un-sito-in-Jekyll/jekyll-mundana-with-my-posts.png&#34;&gt;as you can see here&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;h4 id=&#34;when-the-default-theme-is-not-enough&#34;&gt;When the default theme is not enough&lt;/h4&gt;&#xA;&lt;p&gt;A well-designed theme is very convenient and, as we&amp;rsquo;ve just seen, allows you to get online quickly with minimal effort. However, it may not fully meet everyone&amp;rsquo;s needs as it is.&lt;/p&gt;&#xA;&lt;p&gt;For example, I wanted to create a multilingual site in both Italian and English &amp;ndash; something that Mundana does not support by default.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, I wanted the site&amp;rsquo;s &lt;code&gt;Home&lt;/code&gt; page to display a summary of the latest posts with thumbnail previews of the featured images, but didn&amp;rsquo;t want the thumbnails to appear in the &lt;a href=&#34;https://melabit.com/img/2025-03-01-da-melabit-a-melabit-sviluppare-un-sito-in-Jekyll/jekyll-mundana-single-post.png&#34;&gt;individual post pages&lt;/a&gt;. Mundana handles the first requirement correctly, but not the second.&lt;/p&gt;&#xA;&lt;p&gt;Another issue concerns &lt;a href=&#34;https://www.seozoom.it/paginazione-siti-web-ottimizzazione-tecniche-seo/&#34;&gt;pagination&lt;/a&gt;: the default pagination looks nice, but it displays a single horizontal row of links to all the generated pages. When there are too many pages, this row expands excessively, overlapping other graphical elements on the page or extending beyond the browser margins.&lt;/p&gt;&#xA;&lt;img src=&#34;https://melabit.com/img/2025-03-01-da-melabit-a-melabit-sviluppare-un-sito-in-Jekyll/jekyll-mundana-pagination.png&#34; alt=&#34;&#34;&gt;&lt;p&gt;Lastly, Mundana natively supports the &lt;a href=&#34;https://disqus.com/&#34;&gt;Disqus&lt;/a&gt; commenting system, but I preferred a self-hosted solution, to avoid reliance on third-party services that could change their terms of use or, worse, shut down unexpectedly.&lt;/p&gt;&#xA;&lt;h4 id=&#34;lets-get-to-work&#34;&gt;Let&amp;rsquo;s get to work!&lt;/h4&gt;&#xA;&lt;p&gt;All the modified theme code is available on GitHub, at &lt;a href=&#34;https://github.com/sabinomaggi/mundana-theme-jekyll-multilang&#34;&gt;https://github.com/sabinomaggi/mundana-theme-jekyll-multilang&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h5 id=&#34;pagination&#34;&gt;Pagination&lt;/h5&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with pagination. Since Jekyll version 3 (we are now at 4.4.1), pagination has been managed by the &lt;a href=&#34;https://jekyllrb.com/docs/pagination/&#34;&gt;jekyll-paginate-v2 plugin&lt;/a&gt;. In Mundana, the pagination code is integrated into the &lt;code&gt;index.html&lt;/code&gt; file and is quite simple, which can cause issues when the number of pages grows.&lt;/p&gt;&#xA;&lt;p&gt;I moved the pagination logic to &lt;code&gt;_includes/custom/paginator.html&lt;/code&gt;,&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; making sure that the links only point to a subset of the available pages: those adjacent to the current page, the first and last pages, and an intermediate page calculated based on the distance of the current page from the first (or last) page. This approach allows pagination to work correctly even on very narrow windows or mobile devices.&lt;/p&gt;&#xA;&lt;p&gt;There isn’t much to say about the code: starting from the current page, all other pagination elements are determined, dynamically generating the HTML code for each link. All the logic is written in &lt;a href=&#34;https://shopify.github.io/liquid/&#34;&gt;&lt;code&gt;Liquid&lt;/code&gt;&lt;/a&gt;, the templating language used by Jekyll. Liquid’s syntax is a bit peculiar and requires some workarounds with variables, but the important thing is that it works.&lt;/p&gt;&#xA;&lt;p&gt;Actually, the most interesting part of the code is the first line, which dynamically changes the text strings based on the active language. But that brings us to the next section.&lt;/p&gt;&#xA;&lt;h5 id=&#34;multilingual-support&#34;&gt;Multilingual support&lt;/h5&gt;&#xA;&lt;p&gt;Jekyll can handle multilingual sites using the &lt;a href=&#34;https://github.com/untra/polyglot&#34;&gt;jekyll-polyglot plugin&lt;/a&gt;, but it does not &lt;em&gt;interact well&lt;/em&gt; with the &lt;code&gt;jekyll-paginate-v2&lt;/code&gt; plugin,&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt; so I needed a different solution.&lt;/p&gt;&#xA;&lt;p&gt;Polyglot is very easy to use: you just need to add the plugin under the relevant section in the &lt;code&gt;_config.yml&lt;/code&gt; configuration file and define two new variables for all the languages you want to support.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[...]&#xA;&#xA;# Plugins&#xA;plugins: &#xA;  [...]&#xA;  - jekyll-polyglot&#xA;&#xA;[...]&#xA;&#xA;# Polyglot&#xA;languages: [en, it, de, fr]&#xA;default_lang: en&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To set the language of a post, simply add the &lt;code&gt;lang:&lt;/code&gt; variable (e.g., &lt;code&gt;lang: en&lt;/code&gt; or &lt;code&gt;lang: it&lt;/code&gt;) to its &lt;a href=&#34;https://jekyllrb.com/docs/front-matter/&#34;&gt;&lt;em&gt;front matter&lt;/em&gt;&lt;/a&gt;, and you&amp;rsquo;re done.&lt;/p&gt;&#xA;&lt;div style = &#34;border-style: solid; border-width: 0px 0px 0px 12px; border-color: #03a87c; background-color: #defef6; padding: 1em; color:black; font-size:100%;&#34;&gt;&#xA;The &lt;code&gt;front matter&lt;/code&gt; in Jekyll is a block of metadata in &lt;code&gt;YAML&lt;/code&gt; format placed at the beginning of a Markdown (&lt;code&gt;.md&lt;/code&gt;) or HTML (&lt;code&gt;.html&lt;/code&gt;) file. &#xA;&lt;p&gt;The front matter is enclosed by three dashes (&lt;code&gt;---&lt;/code&gt;) and provides information about the page or post, such as the title, language, layout, and settings for customizing the page behavior. For example:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;---&#xA;title: &amp;#34;Welcome&amp;#34;&#xA;layout: default&#xA;permalink: /it/&#xA;lang: it&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When Jekyll processes the site, it uses the front matter to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Define the template to use for rendering the page (&lt;code&gt;layout: default&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Customize the URL associated with the page (&lt;code&gt;permalink: /it/&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Set specific variables for that file, which can be used in layouts and themes (&lt;code&gt;lang: it&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If a page or post includes the &lt;code&gt;lang: it&lt;/code&gt; variable in the front matter, Polyglot can use it to apply content or styles specific to the Italian version of the site.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;My idea was to manually emulate the behavior of &lt;code&gt;polyglot&lt;/code&gt;. The first step was to define two new variables in &lt;code&gt;_config.yml&lt;/code&gt;, that are similar to those used by Polyglot:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#--- Custom localization variables ---&#xA;# Polyglot does not work well with Paginate-v2&#xA;# define these two variables instead&#xA;locales: [en, it]&#xA;default_locale: en&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I also added a new variable to the &lt;em&gt;front matter&lt;/em&gt; of each page or post, which, following the same pattern as &lt;code&gt;_config.yml&lt;/code&gt;, could be either &lt;code&gt;locale: en&lt;/code&gt; or &lt;code&gt;locale: it&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To simplify language management, I created two subfolders, &lt;code&gt;en&lt;/code&gt; and &lt;code&gt;it&lt;/code&gt;, inside the main &lt;code&gt;_posts&lt;/code&gt; directory to store posts in their respective languages. This way, it is very easy to add the correct &lt;code&gt;locale&lt;/code&gt; variable to each group of posts with &lt;code&gt;sed&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Lastly, I leveraged a Jekyll feature: when Jekyll finds a file with a language indicator in its name, it treats it as another version of the original file (without the indicator), inheriting all its content but using the specific variables defined in its front matter.&lt;/p&gt;&#xA;&lt;p&gt;In other words, if I have an &lt;code&gt;index.html&lt;/code&gt; file that contains all the code for the &lt;code&gt;Home&lt;/code&gt; page of the site, and I create a new empty &lt;code&gt;index_it.html&lt;/code&gt; file, adding the &lt;code&gt;locale: it&lt;/code&gt; variable to its front matter, the &lt;code&gt;index_it.html&lt;/code&gt; file will inherit all the content from &lt;code&gt;index.html&lt;/code&gt;, but will use the &lt;code&gt;locale&lt;/code&gt; variable to localize the page for Italian. This mechanism is well documented in some pages I consulted, but unfortunately I can&amp;rsquo;t find the links anymore.&lt;/p&gt;&#xA;&lt;p&gt;One last detail: when using pagination, the &lt;code&gt;locale: it&lt;/code&gt; variable must be defined inside the &lt;code&gt;pagination:&lt;/code&gt; variable in the front matter:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pagination:&#xA;    enabled: true&#xA;    locale: it&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Therefore, all code that dynamically determines the language of a page must always check both the &lt;code&gt;page.locale&lt;/code&gt; and the &lt;code&gt;page.pagination.locale&lt;/code&gt; variables.&lt;/p&gt;&#xA;&lt;p&gt;Of course, all text strings on the site must also be adapted to the selected language. To achieve this, there is a &lt;code&gt;_data/translations.yml&lt;/code&gt; file containing English and Italian translations for all the strings used.&lt;/p&gt;&#xA;&lt;p&gt;Needless to say, setting up the localization mechanism correctly took the most time during the development of &lt;code&gt;melabit.com/posts/en&lt;/code&gt;. However, the way it&amp;rsquo;s done allows to add a new language in just a few steps: add the new language code to the &lt;code&gt;locales&lt;/code&gt; variable in &lt;code&gt;_config.yml&lt;/code&gt;, add another folder inside &lt;code&gt;_posts&lt;/code&gt;, and include the language flag image in &lt;code&gt;assets/images&lt;/code&gt;. Almost makes me want to try it&amp;hellip; 😂&lt;/p&gt;&#xA;&lt;h5 id=&#34;thumbnails-and-comments&#34;&gt;Thumbnails and comments&lt;/h5&gt;&#xA;&lt;p&gt;After dealing with localization, removing the thumbnail from post pages was easy. I just had to find the relevant lines of code and comment them out. Problem solved.&lt;/p&gt;&#xA;&lt;p&gt;Comments, on the other hand, were a completely different story, even more complicated than localization. But that will be the topic of the &lt;a href=&#34;https://melabit.com/en/2025/03/05/from-melabit-to-melabit-managing-comments-with-jekyll/&#34;&gt;next post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;For example, while writing this post, I came across &lt;a href=&#34;https://jekyll-themes.com/kitian616/jekyll-TeXt-theme&#34;&gt;this theme&lt;/a&gt;, which doesn&amp;rsquo;t match my original idea for a site but might have worked just as well (but I’m not changing now).&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;Jekyll is a &lt;em&gt;static&lt;/em&gt; site generator, but even static sites today require a certain level of &lt;em&gt;dynamism&lt;/em&gt; to handle things like search functionality, comments, and more.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;I placed all the new code inside the &lt;code&gt;custom&lt;/code&gt; folder to physically separate it from the original theme files.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:4&#34;&gt;&#xA;&lt;p&gt;Since several posts from 4-5 years ago report successfully using both &lt;code&gt;jekyll-polyglot&lt;/code&gt; and &lt;code&gt;jekyll-paginate-v2&lt;/code&gt;, this may be a Mundana-specific issue. Alternatively, it could be an incompatibility that has emerged in the latest versions of Jekyll or of the two plugins.&amp;#160;&lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: Jekyll, installation and basic configuration</title>
      <link>https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/</link>
      <pubDate>Tue, 11 Feb 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/02/11/from-melabit-to-melabit-jekyll-installation-and-basic-configuration/</guid>
      <description>&lt;p&gt;This post is not meant to be a detailed guide on installing and configuring &lt;a href=&#34;https://jekyllrb.com/&#34;&gt;Jekyll&lt;/a&gt;; for that, there are excellent guides listed below.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;Instead, this post is a commented collection of notes I took while developing &lt;a href=&#34;https://melabit.com/en/&#34;&gt;melabit.com/posts/en&lt;/a&gt;. They are the result of days and days of trial and error, changes in direction, and research to find the &lt;em&gt;right&lt;/em&gt; command. These notes were useful for me to remember what I had done and how I had solved the issues that arose from time to time. They might be useful for you to get everything done more quickly and smoothly.&lt;/p&gt;&#xA;&lt;h4 id=&#34;installing-jekyll&#34;&gt;Installing Jekyll&lt;/h4&gt;&#xA;&lt;p&gt;To experiment with Jekyll, there is nothing better than using a virtual machine, preferably with a lightweight Linux server version. A good alternative is a virtual cloud server, even a cheap one, like &lt;a href=&#34;https://upcloud.com/products/cloud-servers&#34;&gt;UpCloud&lt;/a&gt;, &lt;a href=&#34;https://cloud.google.com/products/compute&#34;&gt;Google Compute Engine&lt;/a&gt;, &lt;a href=&#34;https://aws.amazon.com/ec2/?nc2=h_ql_prod_fs_ec2&#34;&gt;Amazon EC2&lt;/a&gt;, or similar. However, for serious work, it is much more convenient and faster to use a &lt;em&gt;real&lt;/em&gt; machine, especially since following these instructions makes the risk of damage almost nil. Luckily, I had an old Mac available, which allowed me to try and retry, knowing that if any issues arose, I could easily reset it.&lt;/p&gt;&#xA;&lt;p&gt;The best guide for installing Jekyll is undoubtedly &lt;a href=&#34;https://jekyllrb.com/docs/installation/&#34;&gt;the official one&lt;/a&gt;, with specific instructions for the most common operating systems.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://jekyllrb.com/docs/installation/macos/&#34;&gt;guide for macOS&lt;/a&gt; is well-done, but the installation requires &lt;a href=&#34;https://brew.sh/&#34;&gt;Homebrew&lt;/a&gt; and a number of steps to be followed carefully. On Linux, the installation is much easier, while on Windows, the best approach is to install the &lt;a href=&#34;https://learn.microsoft.com/en-us/windows/wsl/about&#34;&gt;Windows Subsystem for Linux (WSL)&lt;/a&gt; and then work &lt;a href=&#34;https://jekyllrb.com/docs/installation/windows/&#34;&gt;essentially in a Linux environment&lt;/a&gt;.&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;An important detail missing from the macOS instructions—but present in those for &lt;a href=&#34;https://jekyllrb.com/docs/installation/freebsd/&#34;&gt;Ubuntu&lt;/a&gt;, &lt;a href=&#34;https://jekyllrb.com/docs/installation/freebsd/&#34;&gt;FreeBSD&lt;/a&gt;, and &lt;a href=&#34;https://jekyllrb.com/docs/installation/other-linux/&#34;&gt;other Linux distributions&lt;/a&gt;—is that before executing the final command &lt;code&gt;gem install jekyll&lt;/code&gt; (or even before starting the Jekyll installation), it is advisable to add these lines to the &lt;code&gt;~/.bashrc&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt; file (depending on the shell used):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#--- Install Ruby gems in the user account, e.g., in ~/.gems ---&#xA;export GEM_HOME=&amp;#34;$HOME/.gems&amp;#34;&#xA;export PATH=&amp;#34;$HOME/.gems/bin:$PATH&amp;#34;&#xA;#--- end ---&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, execute &lt;code&gt;source ~/.bashrc&lt;/code&gt; or &lt;code&gt;source ~/.zshrc&lt;/code&gt; to activate the new environment variables (I usually just close and reopen the Terminal).&lt;/p&gt;&#xA;&lt;p&gt;What are these lines for? They instruct &lt;a href=&#34;https://www.ruby-lang.org/en/&#34;&gt;RubyGems&lt;/a&gt;, Ruby’s package manager, to install all its &lt;em&gt;gems&lt;/em&gt;,&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; including Jekyll, in the user account instead of system-wide. This is a good practice as it separates the native &lt;code&gt;Ruby&lt;/code&gt; installation within the operating system from everything we install ourselves, allowing us to fix inevitable errors without risking system integrity.&lt;/p&gt;&#xA;&lt;p&gt;At this point, you can proceed with the actual Jekyll installation,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gem install jekyll&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Immediately after, install another very useful gem, &lt;a href=&#34;https://rubygems.org/gems/bundler&#34;&gt;Bundler&lt;/a&gt;,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gem install bundler&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which, inexplicably, is completely omitted from the macOS instructions.&lt;/p&gt;&#xA;&lt;p&gt;To instruct &lt;code&gt;bundler&lt;/code&gt; to install everything within the user account, execute&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ bundle config set --local path $GEM_HOME&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finally, if you are using a virtual machine or cloud server and your main operating system is macOS, install this gem,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gem install rmate&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which will allow you to use &lt;a href=&#34;https://macromates.com/&#34;&gt;TextMate&lt;/a&gt;, which I consider the best overall editor for macOS, to edit files remotely instead of using &lt;code&gt;nano&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, or &lt;code&gt;emacs&lt;/code&gt; directly on the virtual/cloud machine (being a Linux server version, it lacks a graphical interface).&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;your-first-jekyll-site&#34;&gt;Your first Jekyll site&lt;/h4&gt;&#xA;&lt;p&gt;After installing Jekyll, all guides suggest creating a new site with&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ jekyll new my-new-blog&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which creates a new &lt;code&gt;my-new-blog&lt;/code&gt; folder in the current directory. Moving into the new folder and starting Jekyll’s built-in web server,&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd my-new-blog&#xA;$ bundle exec jekyll serve --host=0.0.0.0&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;will allow you to view the new site at &lt;code&gt;http://localhost:4000&lt;/code&gt; if using a real machine. With a virtual/cloud machine, you should point the browser to the public URL provided by the server, always using port 4000.&lt;/p&gt;&#xA;&lt;img src=&#34;https://melabit.com/img/2025-02-11-da-melabit-a-melabit-jekyll-installazione-e-configurazione-di-base/jekyll-new-site.png&#34; alt=&#34;&#34;&gt;&lt;p&gt;This procedure is useful for verifying that everything works, and &lt;a href=&#34;https://github.com/jekyll/minima&#34;&gt;Minima&lt;/a&gt;, the default theme, is very clean and elegant. If Minima is enough for you, you can stop here, simply add a site title and content, and you’re ready to go.&lt;/p&gt;&#xA;&lt;p&gt;However, this process gives only a vague idea of what Jekyll can &lt;em&gt;really&lt;/em&gt; do since its features are tightly integrated with its themes.&lt;/p&gt;&#xA;&lt;h4 id=&#34;jekyll-and-its-themes&#34;&gt;Jekyll and its themes&lt;/h4&gt;&#xA;&lt;p&gt;Minima is an example of a &lt;em&gt;gem-based&lt;/em&gt; theme, installed outside the site’s folder and theoretically easily replaceable with another &lt;em&gt;gem&lt;/em&gt; theme, like the one shown below.&lt;/p&gt;&#xA;&lt;img src=&#34;https://melabit.com/img/2025-02-11-da-melabit-a-melabit-jekyll-installazione-e-configurazione-di-base/jekyll-new-site-gem.png&#34; alt=&#34;&#34;&gt;&lt;p&gt;However, such themes are rare, generally minimalistic, and harder to modify or extend. Worse yet, they are often designed for outdated Jekyll versions and may not work with the latest ones.&lt;sup id=&#34;fnref:5&#34;&gt;&lt;a href=&#34;#fn:5&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;p&gt;Most &lt;a href=&#34;http://jekyllthemes.org/&#34;&gt;Jekyll themes&lt;/a&gt; instead come in a format that combines content and design within a single folder. This is very convenient when you find the &lt;em&gt;right&lt;/em&gt; theme but makes changing themes later much more complicated.&lt;/p&gt;&#xA;&lt;p&gt;Installing most Jekyll themes essentially means installing an entire pre-built site, then replacing the default posts and images with your own. Therefore, it is best to &lt;em&gt;first&lt;/em&gt; choose a theme that suits your needs and &lt;em&gt;then&lt;/em&gt; start customizing it.&lt;/p&gt;&#xA;&lt;p&gt;But this will be the topic of the&lt;a href=&#34;https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/&#34;&gt; next post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;if-you-no-longer-like-jekyll&#34;&gt;If you no longer like Jekyll&lt;/h4&gt;&#xA;&lt;p&gt;Then you need to uninstall everything. The &lt;a href=&#34;https://emaxime.com/2018/how-to-uninstall-all-ruby-gems&#34;&gt;modern way to do this&lt;/a&gt; is with&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gem uninstall --all --ignore-dependencies --executables --verbose&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;or, for those who love compact commands&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ gem uninstall -aIxV&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you followed the initial advice of installing everything in the user account, no admin privileges are needed. Otherwise, you’ll have to prepend &lt;code&gt;sudo&lt;/code&gt; as a penalty for your mistake.&lt;/p&gt;&#xA;&lt;p&gt;After uninstalling all gems, you could also remove &lt;code&gt;ruby&lt;/code&gt; and related packages using Homebrew on macOS or the package manager for your Linux distribution. But with today’s large disks, is it really worth the effort just to save a few MB?&lt;/p&gt;&#xA;&lt;h4 id=&#34;until-next-time&#34;&gt;Until next time&lt;/h4&gt;&#xA;&lt;p&gt;This post is already too long, so let’s end it here. The &lt;a href=&#34;https://melabit.com/en/2025/03/01/from-melabit-to-melabit-developing-a-web-site-in-jekyll/&#34;&gt;next post&lt;/a&gt; will dive into the actual development of a Jekyll site. See you soon!&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;With Jekyll’s extensive documentation, the real challenge is distinguishing useful guides from time-wasters.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;From now on, I won’t mention Windows, as the necessary instructions are identical to those for Linux.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;A &lt;em&gt;gem&lt;/em&gt; is a program or a library written in &lt;code&gt;Ruby&lt;/code&gt; that contains everything needed to run it or to develop new programs that utilize its functions. Gems are installed using the standard package manager, RubyGems, whose &lt;code&gt;gem&lt;/code&gt; command allows performing all installation, update, and uninstallation processes for various gems.&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:4&#34;&gt;&#xA;&lt;p&gt;Of course, this is irrelevant for &lt;code&gt;vim&lt;/code&gt; or &lt;code&gt;emacs&lt;/code&gt; masters.&amp;#160;&lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:5&#34;&gt;&#xA;&lt;p&gt;When I say &amp;ldquo;often,&amp;rdquo; I am not exaggerating at all.&amp;#160;&lt;a href=&#34;#fnref:5&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: why Jekyll?</title>
      <link>https://melabit.com/en/2025/01/21/from-melabit-to-melabit-why-jekyll/</link>
      <pubDate>Tue, 21 Jan 2025 18:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/01/21/from-melabit-to-melabit-why-jekyll/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-01-21-da-melabit-a-melabit-perche-jekyll/jametlene-reskp-fmyZcoCaSac-unsplash.jpg&#34; alt=&#34;&#34;&gt;&#xA;&amp;ndash; &lt;em&gt;Source: &lt;a href=&#34;https://unsplash.com/@reskp&#34;&gt;Jametlene Reskp&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;As I mentioned in my &lt;a href=&#34;https://melabit.com/en/2025/01/02/from-melabit-to-melabit-goodbye-wordpress-hello-jekyll/&#34;&gt;last post&lt;/a&gt;, leaving the WordPress &lt;em&gt;comfort zone&lt;/em&gt; wasn’t easy at all.&lt;/p&gt;&#xA;&lt;p&gt;Going from focusing solely on writing something interesting &amp;ndash; while a team of system administrators and web programming experts handled everything else &amp;ndash; to having to do it all by myself was a massive leap.&lt;/p&gt;&#xA;&lt;p&gt;It took quite some time to set up the new system, add missing features, and resolve the (many) unexpected technical issues. And let’s not forget that, in the meantime, I was still managing my regular work and trying to write a post now and then.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;Thus, the primary need was to base this new blog on a stable and reliable platform, a platform that wouldn’t change every week or, worse, suddenly vanish because its developer got tired of tinkering with the project.&lt;/p&gt;&#xA;&lt;p&gt;Having abundant, well-written documentation was also essential: clear guides for configuring the system and finding quick solutions to problems (which are inevitable) are a tremendous help, saving countless hours of frustration.&lt;/p&gt;&#xA;&lt;p&gt;With these criteria, the choice was inevitable, and it was the same as &lt;a href=&#34;https://melabit.wordpress.com/2014/12/31/and-the-winner-is/&#34;&gt;many years ago&lt;/a&gt;: Jekyll.&lt;/p&gt;&#xA;&lt;p&gt;Because &lt;a href=&#34;http://jekyllrb.com/&#34;&gt;Jekyll&lt;/a&gt; may have its flaws, such as the slow site generation and the bulkiness of the generated code, but it’s been around for 16 years. It continues to be regularly developed without dramatic overhauls (the &lt;a href=&#34;https://github.com/jekyll/jekyll&#34;&gt;latest release&lt;/a&gt; was in September 2024), and you can find guides online for virtually anything you might encounter when building a site with this platform.&lt;/p&gt;&#xA;&lt;p&gt;After all, it’s no coincidence that &lt;a href=&#34;https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll&#34;&gt;GitHub chose Jekyll&lt;/a&gt; as the platform for generating sites directly from its repositories.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;Back then, I was so convinced about Jekyll that I wrote all 482 posts of the blog on &lt;a href=&#34;https://melabit.wordpress.com/&#34;&gt;wordpress.com&lt;/a&gt; in Markdown, with a &lt;a href=&#34;https://jekyllrb.com/docs/front-matter/&#34;&gt;YAML front matter&lt;/a&gt; like the one used by Jekyll and saved images in folders named after the posts.&lt;/p&gt;&#xA;&lt;p&gt;On WordPress, this wasn’t necessary because all I had to (and could) do was copy the text into a new post, add the images, and click publish (well, it’s a bit more complicated, but you get the idea).&lt;/p&gt;&#xA;&lt;p&gt;However, having everything neatly prepared in the &lt;em&gt;right&lt;/em&gt;_ format significantly simplified the transition from WordPress to a static site based on Jekyll. I just had to set up the basic structure, add the posts and images, and generate the site to have everything ready to go (again, it’s &lt;em&gt;slightly&lt;/em&gt; more complex than that, but you get the idea).&lt;/p&gt;&#xA;&lt;p&gt;If I hadn’t kept the original texts, I could have used a &lt;a href=&#34;https://github.com/benbalter/wordpress-to-jekyll-exporter&#34;&gt;WordPress plugin&lt;/a&gt; to &lt;a href=&#34;https://heidloff.net/article/migrating-from-wordpress-to-jekyll/&#34;&gt;export the posts from WordPress to Jekyll&lt;/a&gt;. (It’s true, there’s a WordPress plugin for almost everything!) But the plugin doesn’t support comments, images are dumped into a non-standard directory and need to be moved, and all links have to be fixed&amp;hellip; Ultimately, in my case, it would have taken more time to clean everything up than to start from scratch.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;Now the foundational work is done, and all the main functions of the new site are more or less working. At this point, it’s easier to explore alternative—and hopefully more performant—solutions to Jekyll.&lt;/p&gt;&#xA;&lt;p&gt;At the top of my list are Bridgetown, a Jekyll &lt;em&gt;fork&lt;/em&gt;_ worth diving into, and Middleman, which intrigues me even if I’m not entirely sure why!&lt;/p&gt;&#xA;&lt;p&gt;It will be fun.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>From melabit to melabit: goodbye WordPress, hello Jekyll</title>
      <link>https://melabit.com/en/2025/01/02/from-melabit-to-melabit-goodbye-wordpress-hello-jekyll/</link>
      <pubDate>Thu, 02 Jan 2025 06:00:00 +0000</pubDate>
      <guid>https://melabit.com/en/2025/01/02/from-melabit-to-melabit-goodbye-wordpress-hello-jekyll/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://melabit.com/img/2025-01-02-da-melabit-a-melabit-addio-wordpress-ciao-jekyll/phoenix.jpeg&#34; alt=&#34;&#34;&gt;&#xA;&amp;ndash; &lt;em&gt;Image generated by the &lt;a href=&#34;https://designer.microsoft.com/image-creator&#34;&gt;Microsoft Designer&lt;/a&gt; AI.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Eleven years ago, when I started writing in this personal space, I never imagined I would stick with &lt;a href=&#34;https://wordpress.com/&#34;&gt;WordPress.com&lt;/a&gt; for so long. WordPress.com is a convenient and reliable blogging platform, but it has always been &lt;a href=&#34;https://melabit.com/en/2014/08/01/i-limiti-di-wordpress-com/&#34;&gt;ill-suited to my way of working&lt;/a&gt;. Over time, I learned to live with these limitations, but the idea of changing platforms never left my mind.&lt;/p&gt;&#xA;&lt;p&gt;From the start, I had a clear idea of &lt;a href=&#34;https://melabit.com/en/2014/12/31/and-the-winner-is/&#34;&gt;which alternative platform&lt;/a&gt; I wanted to use. A few years later, I revisited the available options and detailed the steps to transition in a &lt;a href=&#34;https://melabit.wordpress.com/2018/04/16/da-melabit-a-melabit-introduzione/&#34;&gt;long series of posts&lt;/a&gt;. Ultimately, though, I didn’t follow through, perhaps because I wasn’t fully convinced about the decision.&lt;/p&gt;&#xA;&lt;p&gt;After all, leaving the comfort zone of a platform that has caused you zero problems over the years to embark on a new journey where you manage everything yourself is no small task.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;A few months ago, however, &lt;a href=&#34;https://automattic.com/&#34;&gt;Automattic&lt;/a&gt;, the company behind the open-source &lt;a href=&#34;https://wordpress.org/&#34;&gt;WordPress&lt;/a&gt; software and its related products, decided to &lt;a href=&#34;https://www.engadget.com/tumblr-and-wordpress-posts-will-reportedly-be-used-for-openai-and-midjourney-training-204425798.html&#34;&gt;share by default&lt;/a&gt; all content hosted on WordPress.com with &amp;ldquo;third parties.&amp;rdquo; Actually, this means sharing it with AI-powered text generators (think ChatGPT and similar tools) that are constantly hungry for new material to improve their training.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; In that moment, my decision was made.&lt;/p&gt;&#xA;&lt;p&gt;As if that weren’t enough, shortly after, Matt Mullenweg, WordPress’s founder, &lt;a href=&#34;https://joshcollinsworth.com/blog/fire-matt&#34;&gt;lost his temper&lt;/a&gt;, highlighting how, despite WordPress being the world’s most popular open-source content management system (CMS), the increasingly centralized and authoritarian control over its development threatens the platform’s open and transparent future.&lt;/p&gt;&#xA;&lt;hr style = &#34;border: none; &#xA;            border-top: 3px double #333; &#xA;            color: #333; &#xA;            overflow: visible; &#xA;            height: 5px; &#xA;            width: 50%; &#xA;            margin-left: auto; &#xA;            margin-right: auto;&#34;&#xA;&gt;&#xA;&#xA;&lt;p&gt;And so, the die is cast! It took a lot of time and effort, but starting today, this little blog has its own home: &lt;a href=&#34;https://melabit.com/en/&#34;&gt;melabit.com/posts/en&lt;/a&gt;, where I can experiment with much greater freedom than before. Let’s see how it goes.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://melabit.com/posts/en&#34;&gt;new site&lt;/a&gt; is still a work in progress. The basic structure is in place, but there will definitely be adjustments and improvements in the coming months. The very first thing to do is to expand the international section, which currently contains only a handful of posts, with several broken links or links to the original posts in italian. Additionally, I would like to implement a system for notifying users of new posts.&lt;/p&gt;&#xA;&lt;p&gt;In the meantime, please don’t hesitate to flag any issues or poorly functioning elements in the comments.&lt;/p&gt;&#xA;&lt;p&gt;For technical details and the transition process, stay tuned for upcoming posts.&lt;/p&gt;&#xA;&lt;p&gt;Rest assured that all old content and comments will remain available on &lt;a href=&#34;https://melabit.wordpress.com/&#34;&gt;melabit.wordpress.com&lt;/a&gt;. At least until Mullenweg kicks me out&amp;hellip; 🤣🤣🤣🤣🤣&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;While it is true you can opt out of sharing your content—and I did—it’s also true that you must explicitly choose &lt;strong&gt;not to share&lt;/strong&gt; your data, rather than the other way around, which would be more logical. And even then, there’s no guarantee that your content won’t be scraped anyway.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
  </channel>
</rss>
