mimeini - Tech & Tutorials

Denne side på dansk


Home
Blog and Projects

Sunday, April 12, 2026

From static to interactive website


This is the first of a small series of tutorials on how you can use Masterdon/Fedivers to add the ability to comment and interact on a static website.

What is a static website?

In the 10s, simple static websites were very common. The two design concepts CSS and HTML were used to design websites, often with different graphic programs. Up through the 10s it became more common to use dynamic websites which were controlled via CMS (Content Management System). Wordpress is the most widely used CMS. In a dynamic website, the content of the page is stored in a database. The page visited is collected at the moment a user visits it. This means that the content is very flexible and dynamic and e.g. can be adapted to the individual user who visits the page.Here in the 20s, it's as if the static pages have had a renaissance. This is, among other things, what I want to talk about in this and future blog posts. More specifically, how you can use the ActivetyPub protocol to create a comment field on your blog.Yes, but now that I have mentioned the ActivityPub protocol, I probably also need to tell a bit about what that is.

ActivityPub

ActivityPub is an Internet communication protocol developed and published by the World Wide Web consortium. It was first released in 2016. ActivityPub is a protocol that allows you to retrieve content from all sorts of different servers and pull it together into an "instance". Any person, associasion or compagny can host their own data and still participate in threads and social networks. The network is not platform dependent, work can be done across all platforms that use ActivityPub. One is not dependent on some commercial companies for their algorithms. You can create your own social media and you can communicate across platforms. A Masterdon profile can talk to a Pixelfed profile or a PeerTube profile without switching platforms. Masterdon is the best known of the platforms that use the ActivityPub protocol.This blog entry is therefore about how to integrate ActivityPub/Fediver's comments on a static website. My review of this topic is based on a review of my own development from the encounter with the Linux operating system, over shell script and website composition to the point where I now use a script-based SSG (Static Site Generators) that I have developed, improved and adapted myself over the course of a few years now.

The Encounter with Linux

In February 1999, I first heard about the Linux operating system. It was in the radio program the Hartdisken on Danish Radio P1 that I was an avid listener of. From the moment I first heard about the free operating system, I wanted to install it on my little laptop. At that time I was already using DOS and the early variants of Windows. It took me about a year before I first managed to get Linux up and running on my already outdated Compaq Laptop. It was a Debian Linux and it was only a text - console no graphics. Later I managed to run graphics via libSVGA, but that's another story.A few years later, I found on the net an instruction on how to make bash shell scripts (small programs) that can run directly in a "linux console" and it really became a door opener for me. I loved devising scripts to automate workflows and I eventually made some pretty complicated constructs with variables, loops, calculations, arrays and regular expressions.In 2004 I taught myself to make websites in pure HTML, simply to write html in a text editor and use a browser to see the result.I made several different websites over the years that I posted on different free subdomains. (I actually have fragments of one of these pages available on my website today. You can see it - HERE - )In 2009, I became familiar with the so-called CMS systems (content management systems). These are systems where you work in a user interface and therefore do not work directly in the codes in a text editor.However, I never felt very comfortable with these systems. I was at my best with a Linux terminal and my beloved terminal programs. Groff for writing documents, Vim as my text editor Image Magic and NetPBM for image processing bashscripts and basic tools like sed, grep, tr and such.In 2022 I felt an urge to go to static websites. And I started to investigate how the development is in that area. I am becoming aware that there has been a whole fashion wave (the Small - web - movement) which is about going back to static websites and getting rid of advertisements and redundant distracting content and the dominance of the big tech companies.In my search for the possibilities, I became aware that in the meantime a whole range of more or less advanced CMS systems had appeared to simplify the process of creating one's own static website. Systems like Jekyll, Hugo, Eleventy that let you create a professionally looking fully finished website in minutes.Most of these systems work by writing a text in an editor and using some simple formatting codes (eg markdown) to format the text. The system then makes an html/css page out of it and places it in the right place in the file structureSome of these systems were quite complicated advanced but I want something simple. Something that could allow me to make blog posts fairly quickly without having to mess with HTML codes along the way.Then I found a very small SSG (Static Site Generators). The program was called bashblog In fact, it was just a simple shell script that could take a text file as input and turn it into a simple html file. I downloaded that script and started experimenting with it.After a short time of experimenting with the script and researching how it could be adapted to my needs, I began to wonder if I could not create a similar script myself that completely suited my needs. A script that leaned on the way I already produced documents, namely with the old text formatting system Groff .Now, if I could use approximately the same text formatting codes to produce websites that I used to format documents, posters and printed matter, I would have a very useful model.It seemed like a very big project, but as I got started it turned out to be a manageable task that I could slowly build on. Add new functionalities and adapt the design continuously.If I want to write a blog post or create a new website, I start with a template that looks like this.


Formatting italic = +i+word++i+, bolt +b+word++b+
.notH1 = Large heading
.notSH = Normal header
.notLP = Not indented paragraph
.notPP = Indented paragraph
.notCP = Centered Paragraph
.notLIADR, .LITXT, .LIFIN = linktags
.notCLIADR, .LITXT, .LIFIN = Centered link on own line
.notIFRAME = inserted an embedded video
.notPREBEG, .PREnotEND = framing a pre-block
Images can be inserted with scripted html imginn
------------------------------------
From here must be filled in::
------------------------------------
.notMBTITLE
Title of the page or blog post
.notMBDISCRIPTION
A brief description of the blog post or page content
.notMBKEYWORDS
Some keywords (max 8)
MBDATE: Sunday, April 12, 2026
.notLP
And here I write my blog post or the text on my page.

This text is then saved in a text document and that text document can then be translated into CSS and HTML via a script that I have made myself and which fits exactly the design I have prepared.Yes, today I have my very own home-made SSG (Static Site Generators) system and, funnily enough, I build modern websites using a Linux terminal with programs, many of which were created during the 70s and 80s (Vim, Groff, NetPBM, Grapic Magic, Bash, Regular Expression, Sed, Grep etc.) and I am not alone using this old tools. Tons of people around the world still uses this old but very precise, and efficient tools to do there everyday task on computerThis was a small personal walk through in preparation for the following tutorial where I will demonstrate how, using Masterdon/Fedivers, you can add a comment field to your static websites and how you can embed the ten most recent posts from your Masterdon account on your static website and thus give it a much more dynamic flow.
-
-

mimeini - tech - footer