<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Melabit</title>
    <link>https://static.233.196.69.159.clients.your-server.de/en/tags/linux/</link>
    <description>Recent content in Linux on Melabit</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 09 Aug 2025 06:00:00 +0000</lastBuildDate>
    <atom:link href="https://static.233.196.69.159.clients.your-server.de/en/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Goodbye dc, welcome luka: a new RPN calculator for the Terminal</title>
      <link>https://static.233.196.69.159.clients.your-server.de/en/2025/08/09/goodbye-dc-welcome-luka-a-new-rpn-calculator-for-the-terminal/</link>
      <pubDate>Sat, 09 Aug 2025 06:00:00 +0000</pubDate>
      <guid>https://static.233.196.69.159.clients.your-server.de/en/2025/08/09/goodbye-dc-welcome-luka-a-new-rpn-calculator-for-the-terminal/</guid>
      <description>&lt;p&gt;The &lt;em&gt;Reverse Polish Notation&lt;/em&gt; (RPN) is a method for performing calculations without the need for parentheses. RPN was popularized in the &amp;rsquo;70s and &amp;rsquo;80s by Hewlett-Packard (HP), that used it in &lt;a href=&#34;https://www.hpmuseum.org/rpnvers.htm&#34;&gt;all its scientific and financial calculators&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When using calculators from rival Texas-Instruments, which all relied on parentheses, it was easy to lose track of how many parentheses had been opened or closed, often forcing users to re-enter the entire expression from scratch. Those who used an RPN calculator didn&amp;rsquo;t have these problems, although they had to overcome a small initial learning curve to get used to the new notation.&lt;/p&gt;&#xA;&lt;p&gt;Today, &lt;em&gt;physical&lt;/em&gt; calculators are rarely used, and almost everyone prefers to use an app on their phone or computer. However, there are still some die-hard nerds who refuse to give in to the graphical interface and insist on using the Terminal. Why? For example, because it&amp;rsquo;s much easier to enter numbers and complex operations with a keyboard than to &lt;em&gt;press&lt;/em&gt; the glass keys of a virtual calculator.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/Gemini_Generated_Image_72y1t072y1t072y1.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 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;&lt;h4 id=&#34;a-bit-of-history&#34;&gt;A bit of history&lt;/h4&gt;&#xA;&lt;p&gt;Poland gave us Nicolaus Copernicus, Fryderyk Chopin, Joseph Conrad, Marie Curie, Arthur Rubinstein, and Stanislaw Lem. But it also gave us Jan Lukasiewicz, a mathematical logician (and philosopher) who, about a hundred years ago, invented a mathematical notation that did not use parentheses.&lt;/p&gt;&#xA;&lt;p&gt;In this &lt;em&gt;Polish notation&lt;/em&gt;, all operation symbols ( \( + \), \( - \), \( \times \), \( / \) ) precede the numbers they apply to. The same applies more generally to mathematical functions, such as  \( \sqrt{} \), \( \sin \), \( \cos \), \( \exp \) (&lt;em&gt;operators&lt;/em&gt;) and the numbers or variables (&lt;em&gt;operands&lt;/em&gt;) they act on.&lt;/p&gt;&#xA;&lt;p&gt;For example, \( 3 + 4 \) is written  in Polish notation as \( + \ 3 \ 4 \), while  \( (5 + 2) \times (5 - 2) \) becomes \( \times + 5 \ 2 - 5 \ 2 \).&lt;/p&gt;&#xA;&lt;p&gt;For many years, this remained just an odd idea, because the benefit of not using parentheses didn&amp;rsquo;t seem to outweigh the unusual and more difficult-to-read notation.&lt;/p&gt;&#xA;&lt;p&gt;Then, in the late &amp;rsquo;50s, John McCarthy brought back Polish (or &lt;em&gt;prefix&lt;/em&gt;) notation for &lt;a href=&#34;https://twobithistory.org/2018/10/14/lisp.html&#34;&gt;LISP&lt;/a&gt;, one of the most influential programming languages of all time,&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; developed with the goal of being applied to the development of programs in the field of nascent artificial intelligence.&lt;/p&gt;&#xA;&lt;p&gt;In fact, prefix notation not only greatly simplified the implementation of the LISP interpreter, but also made it possible to represent both code and data in the same form, an invaluable feature for a language designed to make computers &lt;em&gt;intelligent&lt;/em&gt;. But better not to digress.&lt;/p&gt;&#xA;&lt;h4 id=&#34;reverse-polish-notation&#34;&gt;Reverse Polish Notation&lt;/h4&gt;&#xA;&lt;p&gt;But the real breakthrough came by inverting the order between operands and operators, that is, by writing the numbers &lt;em&gt;first&lt;/em&gt; and &lt;em&gt;then&lt;/em&gt; the operations to be performed on them, so \( 3 + 4 \) becomes \( 3 \ 4 \ + \) and \( (5 + 2) \times (5 - 2) \) becomes \( \ 5 \ 2 + 5 \ 2 - \times \).&lt;/p&gt;&#xA;&lt;p&gt;This &lt;a href=&#34;https://en.wikipedia.org/wiki/Reverse_Polish_notation&#34;&gt;&lt;em&gt;Reverse Polish Notation&lt;/em&gt;&lt;/a&gt; (RPN) was discovered and rediscovered at least three times in twenty years, but it only became popular in the early &amp;rsquo;60s when Friedrich Bauer, the inventor of the concept of &lt;a href=&#34;https://en.wikipedia.org/wiki/Stack_%5C%28abstract_data_type%5C%29&#34;&gt;&lt;em&gt;stack&lt;/em&gt;&lt;/a&gt; and one of the developers of the &lt;a href=&#34;https://en.wikipedia.org/wiki/ALGOL&#34;&gt;ALGOL&lt;/a&gt; computer language, and Edsger Dijkstra, famous for solving the &amp;ldquo;shortest path problem&amp;rdquo; and for a thousand other things, took up the concept again, because it reduced access to memory, which at the time was scarce and slow, and ensured that all operations were performed within a well-defined memory area (the &lt;em&gt;stack&lt;/em&gt;), that was therefore easier to manipulate.&lt;/p&gt;&#xA;&lt;p&gt;The advantages of RPN for performing mathematical calculations were so evident that HP used it in practically &lt;a href=&#34;https://www.hpmuseum.org/rpnvers.htm&#34;&gt;all its scientific and financial calculators&lt;/a&gt;, at least until the early &amp;rsquo;90s. The development of larger memories and much bigger displays made it possible to easily view and modify the entire entered operation &amp;ndash; not just the last number entered &amp;ndash; thus reducing the necessity of using RPN.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;br/&gt;&#xA;&lt;h4 id=&#34;a-calculator-in-the-terminal&#34;&gt;A calculator in the Terminal&lt;/h4&gt;&#xA;&lt;p&gt;Those who wish to use a traditional calculator in the macOS or Linux Terminal have an almost mandatory choice: &lt;code&gt;bc&lt;/code&gt;, the &lt;a href=&#34;https://en.wikipedia.org/wiki/Bc_%5C%28programming_language%5C%29&#34;&gt;&lt;em&gt;basic calculator&lt;/em&gt;&lt;/a&gt;, that has been a part of UNIX since 1975, a full 50 years. The current version, available on Linux and macOS, has been completely rewritten, but the original was just an interface for &lt;code&gt;dc&lt;/code&gt; (&lt;a href=&#34;https://en.wikipedia.org/wiki/Dc_%5C%28computer_program%5C%29&#34;&gt;&lt;em&gt;desk calculator&lt;/em&gt;&lt;/a&gt;), one of the oldest utilities present in UNIX and even older than the C language.&lt;/p&gt;&#xA;&lt;p&gt;And &lt;code&gt;dc&lt;/code&gt; was&amp;hellip; an RPN calculator. A choice that confirmed HP&amp;rsquo;s intuition: RPN notation was more efficient and easier to implement, and therefore also ideal for the limited-resource computers of the &amp;rsquo;70s.&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;Today, RPN is no longer a choice forced by hardware limitations, but rather a choice driven largely by convenience. Once you&amp;rsquo;ve spent half an hour learning to use it, you discover that it&amp;rsquo;s really much more convenient to perform calculations with this notation than with the traditional algebraic notation.&lt;/p&gt;&#xA;&lt;p&gt;And then, maybe, there&amp;rsquo;s also a certain pleasure in going against the flow: in a world where everyone conforms to the dictates of (real or presumed) social media influencers, using an RPN calculator becomes a way to stand out, to feel different, almost a declaration of intellectual independence.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;dc&lt;/code&gt; is still available on Linux and macOS and can be used in the Terminal, but it’s quite a hassle, its fifty years clearly show. The results of the operations are not visible unless you explicitly &lt;em&gt;print&lt;/em&gt; them on the screen with &lt;code&gt;p&lt;/code&gt;. The stack isn&amp;rsquo;t visible either, unless you explicitly request it with &lt;code&gt;f&lt;/code&gt;. Negative numbers are indicated with an underscore &lt;code&gt;_&lt;/code&gt; and not with the usual &lt;code&gt;-&lt;/code&gt;  sign, so that \( - 4 \) must be written as \( _4 \). And so on.&lt;/p&gt;&#xA;&lt;p&gt;But starting (almost) today, there&amp;rsquo;s &lt;code&gt;dc2&lt;/code&gt;, or rather, &lt;code&gt;luka&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;the-21st-century-rpn-calculator&#34;&gt;The 21st-century RPN calculator&lt;/h4&gt;&#xA;&lt;p&gt;Since a few weeks we have a new RPN calculator for the macOS and Linux Terminal, initially called &lt;a href=&#34;https://github.com/mastro35/dc2&#34;&gt;&lt;code&gt;dc2&lt;/code&gt;&lt;/a&gt;, in homage to the venerable, now over-50-year-old calculator.&lt;/p&gt;&#xA;&lt;p&gt;However, &lt;code&gt;dc2&lt;/code&gt; sounded too much like a rewrite of the original, while this is a completely new project, written from scratch in &lt;code&gt;C&lt;/code&gt;. It therefore deserved its own name,  &lt;a href=&#34;https://github.com/mastro35/luka&#34;&gt;&lt;code&gt;luka&lt;/code&gt;&lt;/a&gt;, in honor of Jan Lukasiewicz, the inventor of the &lt;em&gt;Polish notation&lt;/em&gt; (see the box above).&lt;/p&gt;&#xA;&lt;p&gt;Compared to &lt;code&gt;dc&lt;/code&gt;, &lt;code&gt;luka&lt;/code&gt; is truly from another century, and it shows as soon as you start trying it out. It&amp;rsquo;s interactive, it shows the content of the stack at all times, it has a history of the operations, variables, a concise but complete inline help, a crystal-clear manual page (if only there were many more like this!)&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/luka-example.png&#34; alt=&#34;&#34;&gt;&lt;br&gt;&#xA;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/luka-help.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;And &lt;code&gt;luka&lt;/code&gt; is also made in Italy. At a time when national identity is exalted for mostly trivial reasons, it&amp;rsquo;s nice to see something that really deserves to be valued.&lt;/p&gt;&#xA;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/luka-credits.png&#34; alt=&#34;&#34;&gt;&lt;p&gt;The program currently has a small &lt;em&gt;bug&lt;/em&gt; related to the display of the history, but the author crunches code much faster than I write words, so it’s very likely the bug will be fixed ASAP (vacations permitting).&lt;/p&gt;&#xA;&lt;h4 id=&#34;evolution-of-the-code&#34;&gt;Evolution of the code&lt;/h4&gt;&#xA;&lt;p&gt;The development of &lt;code&gt;dc2&lt;/code&gt;/&lt;code&gt;luka&lt;/code&gt; has been incredibly fast. Behind the project is Davide Mastromatteo, known among his &lt;em&gt;pen pals&lt;/em&gt; as @mastro35 and author of the excellent blog &lt;a href=&#34;https://thepythoncorner.com/&#34;&gt;The Python Corner&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In just a few days, Davide went from version 0.1.0, which was perfectly functional but had a still-raw user interface,&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-010.png&#34; alt=&#34;&#34;&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-010-help.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;to version 0.2.0, with a much clearer view of the stack, the ability to use degrees and radians, and to change the number representation format, as well as a more compact help.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-020.png&#34; alt=&#34;&#34;&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-020-help.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Version 0.3.0 introduced the history of operations and a further revised help,&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-030.png&#34; alt=&#34;&#34;&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/img/2025-08-09-addio-dc-benvenuta-luka-una-nuova-calcolatrice-rpn-da-terminale/dc2-030-help.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;while version 0.4.0, which coincided with the program&amp;rsquo;s name change, brought us variables and several new keyboard commands, as can be seen in the first two images of this post.&lt;/p&gt;&#xA;&lt;h4 id=&#34;using-luka&#34;&gt;Using luka&lt;/h4&gt;&#xA;&lt;p&gt;Installing &lt;code&gt;luka&lt;/code&gt; on a Mac or Linux is a breeze, at least for &lt;a href=&#34;https://www.melabit.com/it/2014/04/29/homebrew-software-per-il-mac-fatto-in-casa/&#34;&gt;those who use &lt;code&gt;homebrew&lt;/code&gt;&lt;/a&gt; (and those who don&amp;rsquo;t should start doing so immediately)&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install mastro35/homebrew-mastro35/luka&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Otherwise, just download the &lt;a href=&#34;https://github.com/mastro35/luka/releases&#34;&gt;latest release&lt;/a&gt; of the source code, unzip it, and run&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;make clean &amp;amp;&amp;amp; make&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;from the Terminal, obviously after &lt;a href=&#34;https://melabit.com/it/2018/01/30/script-per-tutti-i-giorni-ricapitoliamo/&#34;&gt;navigating to the directory&lt;/a&gt; that contains the source code.&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;&lt;/p&gt;&#xA;&lt;p&gt;Needless to say, anyone who has &lt;code&gt;make&lt;/code&gt; and a C compiler installed on Windows can also compile &lt;code&gt;luka&lt;/code&gt; on that operating system.&lt;/p&gt;&#xA;&lt;p&gt;I almost forgot: soon there will be packages for Linux, in both &lt;code&gt;deb&lt;/code&gt; and &lt;code&gt;rpm&lt;/code&gt; formats, and who knows, maybe also &lt;code&gt;aur&lt;/code&gt;. Perhaps even an installer for Windows.&lt;/p&gt;&#xA;&lt;p&gt;There’s little to add about using the calculator itself. Those familiar with RPN will feel right at home and quickly use &lt;code&gt;luka&lt;/code&gt;’ to its full potential. Those who don&amp;rsquo;t know RPN might be tempted to try it, if only to try firsthand how much more convenient it can be to perform calculations with an RPN calculator compared to a traditional algebraic one.&lt;/p&gt;&#xA;&lt;p&gt;There are countless guides to RPN, but unfortunately, they are all oriented toward &lt;a href=&#34;https://hansklav.home.xs4all.nl/rpn/&#34;&gt;explaining its use with a physical calculator&lt;/a&gt;, such as the now legendary &lt;em&gt;vintage&lt;/em&gt; HPs, or with graphical emulators for Android or iOS.&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;p&gt;Compared to these guides, there are some differences to consider. The main one is that, lacking physical keys, &lt;code&gt;luka&lt;/code&gt; (but also &lt;code&gt;dc&lt;/code&gt;) requires you to press &lt;code&gt;ENTER&lt;/code&gt; each time to insert a number or function. Some function names are also different, as are the commands for managing the stack or for saving and retrieving variables. For example, &lt;code&gt;luka&lt;/code&gt; uses &lt;code&gt;store&lt;/code&gt; and &lt;code&gt;load&lt;/code&gt; for variables, while physical or emulated calculators generally use keys named &lt;code&gt;STO&lt;/code&gt; and &lt;code&gt;RCL&lt;/code&gt; (but if the author reads this post, maybe he will change them 😂). However, apart from these tiny details, the underlying logic doesn&amp;rsquo;t change.&lt;/p&gt;&#xA;&lt;p&gt;For my part, I tried in every way to make &lt;code&gt;luka&lt;/code&gt; crash, and never succeeded. I tested it with factorials of absurdly large or small numbers, divided by zero, performed the infamous\( 0 / 0 \) and then asked to calculate the reciprocal of the result. But no matter what, &lt;code&gt;luka&lt;/code&gt; always returned the correct result. In short, the quality is definitely there.&lt;/p&gt;&#xA;&lt;h4 id=&#34;conclusions&#34;&gt;Conclusions&lt;/h4&gt;&#xA;&lt;p&gt;Trying &lt;code&gt;luka&lt;/code&gt; costs nothing. It installs (and uninstalls) in a few seconds, works on macOS, Linux, and, for those who want, even on Windows. The results it produces are exact (and this is the most important thing). The developer is skilled and open to suggestions. In short, it&amp;rsquo;s an ideal tool for anyone who wants to perform calculations from the Terminal.&lt;/p&gt;&#xA;&lt;p&gt;Sure, it&amp;rsquo;s a niche tool, aimed at a select group of sophisticated users who appreciate RPN notation and are not afraid of the Terminal. But that’s also what what gives it its unique charm.&lt;/p&gt;&#xA;&lt;p&gt;And then, what about the beauty of seeing a program evolve before our very eyes, maybe even &lt;a href=&#34;https://github.com/mastro35/luka/issues&#34;&gt;participating in its development&lt;/a&gt; with suggestions or criticisms?&lt;/p&gt;&#xA;&lt;p&gt;And beyond that, there’s something special about watching a program evolve right before our eyes, especially when you can &lt;a href=&#34;https://github.com/mastro35/luka/issues&#34;&gt;join the development&lt;/a&gt; with your own suggestions or feedback.&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 one of the few languages, along with &lt;a href=&#34;https://www.melabit.com/it/2024/10/06/70-anni-di-fortran-piu-o-meno/&#34;&gt;FORTRAN&lt;/a&gt; and COBOL, to still be alive and well.&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 by chance, one of the most efficient programming languages ever is FORTH, which is based on a stack and uses RPN.&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;What, you don&amp;rsquo;t even have &lt;code&gt;make&lt;/code&gt;? Then hurry up and install &lt;code&gt;homebrew&lt;/code&gt;!&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;For iOS, I recommend without hesitation &lt;a href=&#34;https://apps.apple.com/it/app/pcalc-lite/id300311831&#34;&gt;PCalc Lite&lt;/a&gt; or, even better, the full version &lt;a href=&#34;https://apps.apple.com/it/app/pcalc/id284666222&#34;&gt;Pcalc&lt;/a&gt;, which costsbout as much as a sandwich and a small bottle of water at a café. Alternatively, &lt;a href=&#34;https://apps.apple.com/it/app/wp-34s/id620255094&#34;&gt;WP 34s&lt;/a&gt;, which manages to compact everything onto a single screen, or &lt;a href=&#34;https://apps.apple.com/it/app/i41cx/id292619450&#34;&gt;i41CX&lt;/a&gt;, perfect for those who once dreamed of having one.&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: hosting Jekyll</title>
      <link>https://static.233.196.69.159.clients.your-server.de/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/</link>
      <pubDate>Tue, 18 Mar 2025 06:00:00 +0000</pubDate>
      <guid>https://static.233.196.69.159.clients.your-server.de/en/2025/03/18/from-melabit-to-melabit-hosting-jekyll/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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://static.233.196.69.159.clients.your-server.de/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>
  </channel>
</rss>
