<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>;</title>
<id>https://fita-slovo.grebedoc.dev/semicolon/all</id>
<link rel="self" href="https://fita-slovo.grebedoc.dev/semicolon/all/feed.xml"/>
<link rel="alternate" type="text/html" hreflang="en" href="https://fita-slovo.grebedoc.dev/semicolon/all/index.html"/>
<author>
  <name>ѲС</name>
  <email>fita-slovo@yandex.ru</email>
</author>
<updated>2026-11-03T00:00:00.000Z</updated>

<entry>
  <title>Making a website using Luasmith and Codeberg</title>
  <id>https://fita-slovo.grebedoc.dev/semicolon/making-this-website/index.html</id>
  <link rel="alternate" href="https://fita-slovo.grebedoc.dev/semicolon/making-this-website/index.html"/>
  <updated>2026-11-03T00:00:00.000Z</updated>
  <summary type="text">Making a website using Luasmith and Codeberg</summary>
  <content type="html">&lt;p&gt;This tutorial shows how to create your own website using &lt;a href=&quot;https://codeberg.org/jaredkrinke/luasmith&quot;&gt;Luasmith&lt;/a&gt; static site generator and &lt;a href=&quot;https://codeberg.org/&quot;&gt;Codeberg&lt;/a&gt; development platform. It is assumed that you already made a Codeberg account and have some basic knowledge on how to use &lt;code&gt;git&lt;/code&gt;, but besides that there are no other requirements; I will explain some things you may be not familiar with if you never made a static website before, although I will try to avoid going too deeply into the details, thus I hope this tutorial may be fairly called a beginner’s guide. This article may as well be considered a “devlog”, because it explains step-by-step how I made &lt;em&gt;this&lt;/em&gt; website you’re visiting right now, I wrote this page while actually creating the website.&lt;/p&gt;
&lt;h2 id=&quot;about-luasmith&quot;&gt;&lt;a href=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/#about-luasmith&quot;&gt;About Luasmith&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Luasmith&lt;/strong&gt; is a static site generator, among many, that is tiny (a single binary with no dependencies that is less than 500 KiB in size, gzip compressed) and quite minimal out of the box, yet very flexible and extensible. While providing the base necessary functionality for your blog or a small website (converting Markdown to HTML, links checking, syntax highlighting, etc), it allows to heavily change what the generator should do with your content and how to turn it into web pages; and you don’t have to learn new exotic languages or deal with various restrictions (that you may find in other generators) since everything is scripted in Lua: a quite old (as a good wine), well-established and commonly used scripting language, so you will feel at home if you already know Lua, as Luasmith uses built-in standard Lua 5.5 interpreter with complete standard library and some &lt;a href=&quot;https://codeberg.org/jaredkrinke/luasmith/src/branch/main/docs/api.md&quot;&gt;extra additions for convenience&lt;/a&gt;. You can download the program from &lt;a href=&quot;https://codeberg.org/jaredkrinke/luasmith/releases/latest/&quot;&gt;releases on Codeberg&lt;/a&gt;, there are builds for Windows, Linux and also a “universal” build that also runs on OS X and most BSDs. If you need to run Luasmith on some other platform, it is extremely trivial to compile.&lt;/p&gt;
&lt;p&gt;Take a note that at the point of writing this tutorial the latest version of Luasmith is 0.10. While it is working great and you can complete most of the tutorial and make your own website with it, at some part of the tutorial I demonstrate the usage of a theme for Luasmith that isn’t compatible with version 0.10, as it depends on some changes that were added after that release. If you want to fully complete the tutorial and if 0.10 is still the latest version when you read this article, you have to build Luasmith from latest sources.&lt;/p&gt;
&lt;h2 id=&quot;creating-a-minimal-blog&quot;&gt;&lt;a href=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/#creating-a-minimal-blog&quot;&gt;Creating a minimal blog&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial I show terminal commands that work on Linux with Bash shell. If you use another environment, don’t forget to change the commands if needed. Let’s start by making a directory for our website and initializing a git repository:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;span class=&quot;hl-identifier&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;website&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;content&lt;/span&gt;
&lt;b class=&quot;hl-function&quot;&gt;cd&lt;/b&gt; &lt;span class=&quot;hl-identifier&quot;&gt;website&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;content&lt;/code&gt; directory is where you place the content files for Luasmith to process. The name “content” is a convention and is expected by default, but you can name it differently if you really want to. You can write the content of your articles in Markdown; if you never worked with this markup language before, it very easy to learn, due to its minimalistic, human-readable (and easily human-writable) syntax. Besides the syntax defined in the &lt;a href=&quot;https://commonmark.org/&quot;&gt;CommonMark specification&lt;/a&gt;, Luasmith supports &lt;a href=&quot;https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables&quot;&gt;GFM-like tables&lt;/a&gt;, &lt;a href=&quot;https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#footnotes&quot;&gt;footnotes&lt;/a&gt;, strikethrough (using tilde marks, e.g. &lt;code&gt;~~text~~&lt;/code&gt; becomes &lt;del&gt;text&lt;/del&gt;) and raw HTML. I made &lt;em&gt;this&lt;/em&gt; page by creating &lt;code&gt;Making this website.md&lt;/code&gt; file in the &lt;code&gt;content&lt;/code&gt; directory, but it doesn’t only content the text itself, but also a front-matter, the page’s metadata for Luasmith. A front-matter can be written in either YAML, JSON or Lua, but I recommend to always write it in Lua, because the support of other formats is limited. For this page, the front-matter is this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-lua&quot;&gt;&lt;i class=&quot;hl-string&quot;&gt;[[
title = &amp;apos;Making a website using Luasmith and Codeberg&amp;apos;
date = &amp;apos;2026-11-03&amp;apos;
]]&lt;/i&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;date&lt;/code&gt; property can be in either &lt;code&gt;YYYY-MM-dd&lt;/code&gt; or &lt;code&gt;YYYY-MM-dd hh:mm:ss&lt;/code&gt; format. The other properties that you can set in a front-matter depend on a theme you use (I will explain what are themes below), but these two (&lt;code&gt;title&lt;/code&gt; and &lt;code&gt;date&lt;/code&gt;) are the minimum stuff that you will most likely write anyway for most pages. I also created &lt;code&gt;index.md&lt;/code&gt; file with some text that will appear on the index page of my website.&lt;/p&gt;
&lt;p&gt;Whatever you add to the content folder will appear on your website, not just Markdown files. Let’s say, you want to add an image and placed it in &lt;code&gt;content/assets/picture.jpg&lt;/code&gt;, in your Markdown text you can add it using &lt;code&gt;![](assets/picture.jpg)&lt;/code&gt;, so your content directory serves as an input root for your future website, and it’s true not for images only, but for links to other pages as well (e.g. &lt;code&gt;[another page](page.md)&lt;/code&gt;); also, in case you are worried whether the links to &lt;code&gt;md&lt;/code&gt; files will work—yes, they will, Luasmith will automatically turn them into links to generated &lt;code&gt;html&lt;/code&gt; pages. And one more thing: it is &lt;em&gt;highly&lt;/em&gt; recommended to write your links as relative to the current page, avoid root-relative links (e.g. &lt;code&gt;[some page](/posts/some_page.md)&lt;/code&gt;) unless you are really sure that your website will be served from the root, otherwise the links will break; Luasmith checks that all relative links are correct and warns you if something is wrong.&lt;/p&gt;
&lt;p&gt;After you wrote your content, there’s one thing that is needed to be added: the &lt;code&gt;site.lua&lt;/code&gt; script, it should be created outside of your content directory (so in &lt;code&gt;website&lt;/code&gt;, not &lt;code&gt;website/content&lt;/code&gt;). This script should return a table containing some extra data for a website. In my case, I wrote this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-lua&quot;&gt;&lt;b class=&quot;hl-keyword&quot;&gt;return&lt;/b&gt; &lt;span class=&quot;hl-operator&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;;&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;subtitle&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;A blog of yet another geek&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;https://fita-slovo.grebedoc.dev/semicolon/&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;hl-operator&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;url&lt;/code&gt; field is necessary for the Atom feeds. If you don’t have your own domain, below in this tutorial I explain how to publish your website using Grebedoc or Codeberg Pages.&lt;/p&gt;
&lt;p&gt;With some content and the &lt;code&gt;site.lua&lt;/code&gt; created, a website can be built:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;span class=&quot;hl-identifier&quot;&gt;luasmith&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;blog&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or, if you named you content directory differently (e.g. &lt;code&gt;mypages&lt;/code&gt;), add the name of the directory as an extra argument (at least that’s the behavior in Luasmith 0.10, it may change in the future). You can also add one more argument for the name of the output directory (it is &lt;code&gt;out&lt;/code&gt; by default):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;span class=&quot;hl-identifier&quot;&gt;luasmith&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;blog&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;mypages&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;output&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In milliseconds after running the command, you will get your website in the output directory. You can open the &lt;code&gt;index.html&lt;/code&gt; file from the output directory in your web browser or start a server to navigate the generated website (e.g. using &lt;code&gt;python3 -m http.server -d out&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/../assets/tutorial1.jpg&quot; alt=&quot;Screenshot of the website using the built-in blog theme.&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;luasmith-themes&quot;&gt;&lt;a href=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/#luasmith-themes&quot;&gt;Luasmith themes&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the commands above, there’s that &lt;code&gt;blog&lt;/code&gt; argument that I didn’t explain yet: this is a name of a Luasmith theme, the Blog theme is one of two built-in themes. A theme is not just a “skin”, a set of templates to define the look of generated websites, but it’s a whole pipeline that tells Luasmith what to do. Writing a custom theme is out of the scope of this tutorial, but you can start with the &lt;a href=&quot;https://codeberg.org/jaredkrinke/luasmith/src/branch/main/docs/tutorial.md&quot;&gt;tutorial from Luasmith documentation&lt;/a&gt; if you really want to make your own—and I hope you will, because there are only a few themes available right now unfortunately. Still, you can notice that the website you are seeing right now doesn’t look the same as on the screenshot above, because I decided to use another theme called &lt;a href=&quot;https://codeberg.org/fita-slovo/luasmith-theme-nara&quot;&gt;Nara&lt;/a&gt;, which I created not only for the different look, but also for some extra features (read more about them in the theme’s repository). And here’s how it can be added:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;submodule&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;https&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;codeberg&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;org&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;fita&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;-slovo&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;luasmith&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;-theme-nara&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;themes&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;nara&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;submodule&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;update&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;--init&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;--recursive&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Take a note that the theme was cloned into &lt;code&gt;themes/nara&lt;/code&gt;, this way it’s possible to call &lt;code&gt;luasmith nara&lt;/code&gt; to build the website instead of pointing to the &lt;code&gt;theme.lua&lt;/code&gt; file (I would have to type something like &lt;code&gt;luasmith luasmith-theme-nara/theme.lua&lt;/code&gt;). If there’s a need to update the theme (Nara is pretty much complete at this point, but I will definitely make some updates in the future), you can pull the changes from inside the theme’s directory:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;b class=&quot;hl-function&quot;&gt;pushd&lt;/b&gt; &lt;span class=&quot;hl-identifier&quot;&gt;themes&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;nara&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;pull&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;--recurse-submodules&lt;/span&gt;
&lt;b class=&quot;hl-function&quot;&gt;popd&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I wanted to give the website a more “nerd-ish” look by using colors from the &lt;a href=&quot;https://en.wikipedia.org/wiki/Solarized&quot;&gt;Solarized color palette&lt;/a&gt; (I guess it’s pretty recognizable) and by making the website title (that semicolon sign on the main page) blink like in a terminal; Nara allows me to do all that without changing the theme, in &lt;code&gt;site.lua&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-lua&quot;&gt;&lt;b class=&quot;hl-keyword&quot;&gt;local&lt;/b&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;light&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;bg&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#fdf6e3&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#586e75&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;accent&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#d33682&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#93a1a1&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#657b83&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-operator&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;dark&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;bg&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#002b36&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#93a1a1&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;accent&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#d33682&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;dim&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#586e75&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hl-identifier&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;#839496&amp;quot;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-operator&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;hl-operator&quot;&gt;}&lt;/span&gt;

&lt;b class=&quot;hl-keyword&quot;&gt;return&lt;/b&gt; &lt;span class=&quot;hl-operator&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;;&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;subtitle&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;A blog of yet another geek&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;apos;https://fita-slovo.grebedoc.dev/semicolon/&amp;apos;&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;customCss&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[
@keyframes blinker {
  50% {
    color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;bg&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;
    background-color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;
  }
}
p &amp;gt; code { color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;}

@media (prefers-color-scheme: dark) {
    @keyframes blinker {
        50% {
            color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;bg&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;
            background-color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;
        }
    }
    p &amp;gt; code { color: ]]&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;colors&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;..&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;[[;}
}

.site-title {
    animation: blinker 1s step-start infinite;
    font-size: 4em;
    margin: 2rem auto;
    font-family: monospace;
    width: fit-content;
}
    ]]&lt;/i&gt;&lt;span class=&quot;hl-operator&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;hl-operator&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the website can be rebuilt using &lt;code&gt;luasmith nara&lt;/code&gt; command, and after some milliseconds (in fact, Nara requires more time than Blog theme to rebuild a website, because its pipeline is significantly more complex) the website is almost ready to be published. Take a note that Nara uses pretty URLs by default, which (in my opinion) is great, but it prevents you from opening the website locally in your web browser from the filesystem (i.e. by opening the files from the output directory without running a server). If you don’t want to run the server when testing locally, but would like to keep pretty URLs when you publish the website, you don’t have to disable that feature of the theme, simply set &lt;code&gt;NO_PRETTY_LINKS&lt;/code&gt; environment variable to any value when building to open locally, and unset the variable when you’re ready to build for publishing.&lt;/p&gt;
&lt;p&gt;One more thing that is nice to do is to add a &lt;code&gt;.gitignore&lt;/code&gt; file with the output directory listed there; this is useful because the files from the output directory will be pushed to a different branch and therefore should not be accidentally committed to the main branch.&lt;/p&gt;
&lt;h2 id=&quot;publishing&quot;&gt;&lt;a href=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/#publishing&quot;&gt;Publishing&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This tutorial should probably have been called “Making a website using Luasmith and &lt;code&gt;echo &amp;#x27;codeberg&amp;#x27; | rev&lt;/code&gt;”, because I publish the website on &lt;a href=&quot;https://grebedoc.dev/&quot;&gt;Grebedoc&lt;/a&gt; (which is the inverse of “Codeberg”), but I find placing code in a title to be ugly and also that title would be too long. Anyway, using Grebedoc is pretty much the same as using &lt;a href=&quot;https://codeberg.page/&quot;&gt;Codeberg Pages&lt;/a&gt;, only the target URL is different. So the next steps are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://codeberg.org/repo/create&quot;&gt;Create&lt;/a&gt; a repository on Codeberg;&lt;/li&gt;
&lt;li&gt;Add a webhook to publish the website from the &lt;code&gt;pages&lt;/code&gt; branch (the &lt;a href=&quot;https://codeberg.page/&quot;&gt;Codeberg Pages&lt;/a&gt; website has a good short instruction for it), the branch will be created later;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://fita-slovo.grebedoc.dev/semicolon/making-this-website/../assets/tutorial2.jpg&quot; alt=&quot;The Forgejo hook set up.&quot;&gt;&lt;/p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Set the origin in the local git repository (Codeberg shows in empty repositories how to do this) and commit everything &lt;strong&gt;except the output dir&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now, the tricky part: it’s time to create a git worktree in the output dir (it’s &lt;code&gt;out&lt;/code&gt; in my case) that will point to the &lt;code&gt;pages&lt;/code&gt; branch, so the sources of the website will be in the main branch, and the &lt;code&gt;pages&lt;/code&gt; branch will only content the generated files that are actually needed to be hosted on Grebedoc.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-terminal&quot;&gt;&lt;span class=&quot;hl-identifier&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;out&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;worktree&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;--orphan&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-B&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;pages&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;out&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;luasmith&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;nara&lt;/span&gt;
&lt;b class=&quot;hl-function&quot;&gt;cd&lt;/b&gt; &lt;span class=&quot;hl-identifier&quot;&gt;out&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-A&lt;/span&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;commit&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-m&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;Upload website&amp;quot;&lt;/i&gt;
&lt;span class=&quot;hl-identifier&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;push&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;--set-upstream&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;origin&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;pages&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After it’s pushed, the webhook on Codeberg should get triggered and soon the website will appear live! The next time you need to update the website, you will not need to write &lt;code&gt;--set-upstream …&lt;/code&gt;, just &lt;code&gt;git push&lt;/code&gt; will work.&lt;/p&gt;
&lt;p&gt;But now you have to be careful: do not remove the output directory completely or you’ll have to repeat setting up the worktree. Using &lt;code&gt;rm -rf out/*&lt;/code&gt; is okay, because it keeps not only the directory itself, but also hidden files, including the &lt;code&gt;.git&lt;/code&gt; file inside the output directory that is required to preserve the worktree. It is a good idea to create some script (s) for commands to work on the website, or, even better, a makefile:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;hl-variable&quot;&gt;LS&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;luasmith&lt;/span&gt;
&lt;span class=&quot;hl-variable&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;content&lt;/span&gt;
&lt;span class=&quot;hl-variable&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;out&lt;/span&gt;
&lt;span class=&quot;hl-variable&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;lua&lt;/span&gt;

&lt;span class=&quot;hl-identifier&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;clean&lt;/span&gt;
    &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;LS&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;nara&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;hl-identifier&quot;&gt;clean&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;hl-operator&quot;&gt;[&lt;/span&gt; &lt;i class=&quot;hl-string&quot;&gt;&amp;quot;$(O)&amp;quot;&lt;/i&gt; &lt;span class=&quot;hl-operator&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;|&lt;/span&gt; &lt;b class=&quot;hl-function&quot;&gt;exit&lt;/b&gt; &lt;i class=&quot;hl-number&quot;&gt;1&lt;/i&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;*&lt;/span&gt;

&lt;span class=&quot;hl-identifier&quot;&gt;serve&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;build&lt;/span&gt;
    &lt;span class=&quot;hl-identifier&quot;&gt;python3&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;hl-identifier&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;hl-default&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;hl-default&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;hl-operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;hl-operator&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can change this file to be simpler if you want to, I just found it necessary to add all these variables for when I do experiments and test stuff in my Luasmith projects. By the way, that cryptic &lt;code&gt;[&amp;quot;$(O)&amp;quot;] || exit 1&lt;/code&gt; means “check that &lt;code&gt;$(O)&lt;/code&gt; is not empty, or exit”, otherwise there’s a risk to replicate an old &lt;del&gt;good&lt;/del&gt; &lt;a href=&quot;https://github.com/ValveSoftware/steam-for-linux/issues/3671&quot;&gt;Steam bug from 2015&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hopefully after reading this tutorial you’ll use Luasmith to create great websites and &lt;code&gt;make&lt;/code&gt; the Internet a better place.&lt;/p&gt;
</content>
</entry>
</feed>
