refactor: split the site generator into templates and content, add news

- templates/ holds the page chrome (base, header, footer, badges, leads)
- content/<lang>/ holds pages as HTML fragments with front matter and the chrome strings
- content/site.toml holds shared values (contact, Bitcoin address, manifesto version)
- static/style.css replaces the CSS embedded in the script
- add news: Markdown posts in content/<lang>/news/, index page, latest posts on the home page
- add [text](url) links and `code` to the Markdown renderer
- copy favicons from logo/web so a fresh clone builds the whole site
- build.py now uses the standard library only and fails on unknown placeholders
This commit is contained in:
squid 2026-11-12 18:34:55 +01:00
commit c8b7b6a571
15 changed files with 931 additions and 487 deletions

58
content/en/index.html Normal file
View file

@ -0,0 +1,58 @@
---
id: home
path: /
nav: home
lead: home
title: kmalloc.org: Technology. Freedom. Dissent.
description: kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet.
---
<p>
<img class="logo" src="/logo-auto.svg" alt="kmalloc" width="112">
</p>
<h1 class="hero">Technology.<br>Freedom.<br>Dissent.</h1>
<p>
<strong>kmalloc.org is a hacker, antifascist, ethical space.</strong>
</p>
<p>
kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet, defending freedom of thought, the dignity of work and the right of people not to be controlled, exploited or subordinated to arbitrary powers.
</p>
<p>
<strong>Allocate freedom.</strong>
</p>
<h2 id="manifesto">Manifesto</h2>
<p>
What we believe, in twelve points and a few commitments:
<a href="{{url_manifesto}}">read the manifesto</a> (version {{manifesto_version}}).
</p>
<h2 id="people">People</h2>
<p>
Who is behind kmalloc.org:
<a href="{{url_people}}">meet the people</a>.
</p>
<h2 id="services">Services</h2>
<p>
Run on our own server, with free software. Accounts are created by hand.
<a href="{{url_services}}">get an account</a>.
</p>
<ul>
<li><a href="https://git.kmalloc.org/">git</a>: code hosting (Forgejo)</li>
<li><a href="https://social.kmalloc.org/@squid">social</a>: Mastodon, accounts on approval</li>
<li><a href="https://lists.kmalloc.org/">lists</a>: mailing lists (Mailman 3)</li>
<li><a href="https://chat.kmalloc.org/">chat</a>: XMPP, web client</li>
<li><a href="https://element.kmalloc.org/">matrix</a>: Matrix, Element web client</li>
<li><a href="https://meet.kmalloc.org/">meet</a>: video conferences (Jitsi Meet)</li>
<li><a href="https://webmail.kmalloc.org/">webmail</a>: email on our own server</li>
</ul>
{{latest_news}}

21
content/en/lang.toml Normal file
View file

@ -0,0 +1,21 @@
# Chrome strings, en.
lang = "en"
other = "it"
other_name = "Italiano"
home_link = "/?lang=en"
url_manifesto = "/manifesto.html"
url_people = "/people.html"
url_services = "/services.html"
url_news = "/news/"
nav_manifesto = "Manifesto"
nav_people = "People"
nav_services = "Services"
nav_news = "News"
sections = "Sections"
nojs = "This page uses no JavaScript, cookies or trackers."
back = "home"
version = "Version"
toc = "Contents"
news_p = "Updates from kmalloc.org."
news_all = "all news"
news_empty = "No news yet."

20
content/en/manifesto.html Normal file
View file

@ -0,0 +1,20 @@
---
id: manifesto
path: /manifesto.html
nav: manifesto
title: kmalloc.org: Manifesto
description: The kmalloc.org manifesto: free software, privacy, an open Internet, dignity at work.
---
<h1>{{manifesto_title}}</h1>
<p>
<strong>{{version}} {{manifesto_version}}</strong>
</p>
<h2>{{toc}}</h2>
<ul>
{{manifesto_toc}}
</ul>
{{manifesto_body}}

14
content/en/news.html Normal file
View file

@ -0,0 +1,14 @@
---
id: news
path: /news/
nav: news
title: kmalloc.org: News
description: Updates from kmalloc.org.
---
<h1>News</h1>
<p>
Updates from kmalloc.org.
</p>
{{news_list}}

0
content/en/news/.gitkeep Normal file
View file

23
content/en/people.html Normal file
View file

@ -0,0 +1,23 @@
---
id: people
path: /people.html
nav: people
title: kmalloc.org: People
description: The people behind kmalloc.org.
---
<h1>People</h1>
<p>
Who is behind kmalloc.org.
</p>
<h2 id="squid">squid</h2>
<p>
I'm squid. I run kmalloc.org, write code and maintain the services on this site. I have been into computers since I was ten, when I got an IBM PS/2 with a 486DX and played Gorilla, a QBasic game: ever since, I have been taking things apart to understand how they work. Outside of work: retro computing, science fiction and extreme metal.
</p>
<ul>
<li><a href="https://social.kmalloc.org/@squid">Mastodon</a></li>
<li><a href="https://git.kmalloc.org/squid">git</a></li>
</ul>

83
content/en/services.html Normal file
View file

@ -0,0 +1,83 @@
---
id: services
path: /services.html
nav: services
title: kmalloc.org: Services
description: The services run by kmalloc.org: email, git, Mastodon, XMPP, Matrix, mailing lists and video conferences. Free, by request.
---
<h1>Services</h1>
<p>
These services run on our own server, with free software, for people who want an alternative to the big platforms.
</p>
<h2 id="account">Get an account</h2>
<p>
The services are free of charge. To ask for an account, write to
<strong>{{contact_shown}}</strong>
(replace (at) with @),
telling us which services you want and the username you would like.
</p>
<h2 id="mail">Email</h2>
<p>
An address @kmalloc.org on our own mail server, with webmail and support for any standard mail client. IMAP: mail.kmalloc.org, port 993 (TLS). SMTP submission: mail.kmalloc.org, port 465 (TLS). Outgoing mail is signed with DKIM and protected by SPF and DMARC.
<a href="https://webmail.kmalloc.org/">open</a>.
</p>
<h2 id="lists">Mailing lists</h2>
<p>
Mailing lists with web archives (Mailman 3). Lists live under @lists.kmalloc.org. If you need one, ask.
<a href="https://lists.kmalloc.org/">open</a>.
</p>
<h2 id="git">Git</h2>
<p>
Code hosting with Forgejo: repositories, issues and pull requests. Git over SSH uses port 2222. Reading public repositories needs no account.
<a href="https://git.kmalloc.org/">open</a>.
</p>
<h2 id="social">Mastodon</h2>
<p>
A Mastodon server. Your address is @name@social.kmalloc.org. You can ask for an account on the site itself: requests are approved by hand.
<a href="https://social.kmalloc.org/">open</a>.
</p>
<h2 id="chat">XMPP chat</h2>
<p>
Instant messaging with XMPP: address name@kmalloc.org, group rooms on conference.kmalloc.org, file sharing, and audio and video calls through our own TURN server. Use the web client or any XMPP app (server kmalloc.org, port 5222).
<a href="https://chat.kmalloc.org/">open</a>.
</p>
<h2 id="matrix">Matrix</h2>
<p>
A Matrix homeserver: address @name:kmalloc.org. Use the Element web client or any Matrix app with homeserver matrix.kmalloc.org.
<a href="https://element.kmalloc.org/">open</a>.
</p>
<h2 id="meet">Video conferences</h2>
<p>
Video conferences with Jitsi Meet. Anyone with the link can join a room; creating a room needs an account.
<a href="https://meet.kmalloc.org/">open</a>.
</p>
<h2 id="donate">Support kmalloc.org</h2>
<p>
Donations are welcome and help keep the server running. Bitcoin address:
<a href="bitcoin:{{btc}}"><code>{{btc}}</code></a>
</p>
<h2 id="terms">Good to know</h2>
<p>
Everything is run by one person on one server, with nightly encrypted backups and no guarantees of availability. Be respectful: the manifesto explains what we stand for.
</p>

59
content/it/index.html Normal file
View file

@ -0,0 +1,59 @@
---
id: home
path: /it/
nav: home
lead: home
title: kmalloc.org: Technology. Freedom. Dissent.
description: kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto.
switch: /?lang=en
---
<p>
<img class="logo" src="/logo-auto.svg" alt="kmalloc" width="112">
</p>
<h1 class="hero">Technology.<br>Freedom.<br>Dissent.</h1>
<p>
<strong>kmalloc.org è uno spazio hacker, antifascista, etico.</strong>
</p>
<p>
kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto, difendendo la libertà di pensiero, la dignità del lavoro e il diritto delle persone a non essere controllate, sfruttate o subordinate a poteri arbitrari.
</p>
<p>
<strong>Allocate freedom.</strong>
</p>
<h2 id="manifesto">Manifesto</h2>
<p>
Quello in cui crediamo, in dodici punti e qualche impegno:
<a href="{{url_manifesto}}">leggi il manifesto</a> (versione {{manifesto_version}}).
</p>
<h2 id="people">Persone</h2>
<p>
Chi c'è dietro kmalloc.org:
<a href="{{url_people}}">conosci le persone</a>.
</p>
<h2 id="services">Servizi</h2>
<p>
Girano sul nostro server, con software libero. Gli account si creano a mano.
<a href="{{url_services}}">richiedi un account</a>.
</p>
<ul>
<li><a href="https://git.kmalloc.org/">git</a>: repository di codice (Forgejo)</li>
<li><a href="https://social.kmalloc.org/@squid">social</a>: Mastodon, account su approvazione</li>
<li><a href="https://lists.kmalloc.org/">lists</a>: liste di posta (Mailman 3)</li>
<li><a href="https://chat.kmalloc.org/">chat</a>: XMPP, client web</li>
<li><a href="https://element.kmalloc.org/">matrix</a>: Matrix, client web Element</li>
<li><a href="https://meet.kmalloc.org/">meet</a>: videoconferenze (Jitsi Meet)</li>
<li><a href="https://webmail.kmalloc.org/">webmail</a>: posta sul nostro server</li>
</ul>
{{latest_news}}

21
content/it/lang.toml Normal file
View file

@ -0,0 +1,21 @@
# Chrome strings, it.
lang = "it"
other = "en"
other_name = "English"
home_link = "/it/"
url_manifesto = "/it/manifesto.html"
url_people = "/it/persone.html"
url_services = "/it/servizi.html"
url_news = "/it/news/"
nav_manifesto = "Manifesto"
nav_people = "Persone"
nav_services = "Servizi"
nav_news = "News"
sections = "Sezioni"
nojs = "Questa pagina non usa JavaScript, cookie né tracker."
back = "home"
version = "Versione"
toc = "Indice"
news_p = "Novità da kmalloc.org."
news_all = "tutte le news"
news_empty = "Ancora nessuna news."

20
content/it/manifesto.html Normal file
View file

@ -0,0 +1,20 @@
---
id: manifesto
path: /it/manifesto.html
nav: manifesto
title: kmalloc.org: Manifesto
description: Il manifesto di kmalloc.org: software libero, privacy, un Internet aperto, dignità nel lavoro.
---
<h1>{{manifesto_title}}</h1>
<p>
<strong>{{version}} {{manifesto_version}}</strong>
</p>
<h2>{{toc}}</h2>
<ul>
{{manifesto_toc}}
</ul>
{{manifesto_body}}

14
content/it/news.html Normal file
View file

@ -0,0 +1,14 @@
---
id: news
path: /it/news/
nav: news
title: kmalloc.org: News
description: Novità da kmalloc.org.
---
<h1>News</h1>
<p>
Novità da kmalloc.org.
</p>
{{news_list}}

0
content/it/news/.gitkeep Normal file
View file

23
content/it/persone.html Normal file
View file

@ -0,0 +1,23 @@
---
id: people
path: /it/persone.html
nav: people
title: kmalloc.org: Persone
description: Le persone dietro kmalloc.org.
---
<h1>Persone</h1>
<p>
Chi c'è dietro kmalloc.org.
</p>
<h2 id="squid">squid</h2>
<p>
Sono squid. Gestisco kmalloc.org, scrivo codice e mantengo i servizi di questo sito. Mi appassionano i computer da quando, a dieci anni, ebbi un IBM PS/2 con un 486DX e giocai a Gorilla, un gioco in QBasic: da allora smonto le cose per capire come funzionano. Fuori dal lavoro: retrocomputing, fantascienza ed extreme metal.
</p>
<ul>
<li><a href="https://social.kmalloc.org/@squid">Mastodon</a></li>
<li><a href="https://git.kmalloc.org/squid">git</a></li>
</ul>

83
content/it/servizi.html Normal file
View file

@ -0,0 +1,83 @@
---
id: services
path: /it/servizi.html
nav: services
title: kmalloc.org: Servizi
description: I servizi di kmalloc.org: posta, git, Mastodon, XMPP, Matrix, liste di posta e videoconferenze. Gratuiti, su richiesta.
---
<h1>Servizi</h1>
<p>
Questi servizi girano sul nostro server, con software libero, per chi vuole un'alternativa alle grandi piattaforme.
</p>
<h2 id="account">Richiedi un account</h2>
<p>
I servizi sono gratuiti. Per chiedere un account scrivi a
<strong>{{contact_shown}}</strong>
(sostituisci (at) con @),
indicando quali servizi vuoi e il nome utente che preferisci.
</p>
<h2 id="mail">Email</h2>
<p>
Un indirizzo @kmalloc.org sul nostro server di posta, con webmail e supporto per qualsiasi client di posta standard. IMAP: mail.kmalloc.org, porta 993 (TLS). Invio SMTP: mail.kmalloc.org, porta 465 (TLS). La posta in uscita è firmata con DKIM e protetta da SPF e DMARC.
<a href="https://webmail.kmalloc.org/">apri</a>.
</p>
<h2 id="lists">Mailing lists</h2>
<p>
Liste di posta con archivi consultabili sul web (Mailman 3). Le liste stanno sotto @lists.kmalloc.org. Se te ne serve una, chiedila.
<a href="https://lists.kmalloc.org/">apri</a>.
</p>
<h2 id="git">Git</h2>
<p>
Hosting di codice con Forgejo: repository, issue e pull request. Git via SSH usa la porta 2222. Per leggere i repository pubblici non serve un account.
<a href="https://git.kmalloc.org/">apri</a>.
</p>
<h2 id="social">Mastodon</h2>
<p>
Un server Mastodon. Il tuo indirizzo è @nome@social.kmalloc.org. L'account si può chiedere direttamente sul sito: le richieste si approvano a mano.
<a href="https://social.kmalloc.org/">apri</a>.
</p>
<h2 id="chat">XMPP chat</h2>
<p>
Messaggistica con XMPP: indirizzo nome@kmalloc.org, stanze di gruppo su conference.kmalloc.org, condivisione di file e chiamate audio e video con un nostro server TURN. Usa il client web o qualsiasi app XMPP (server kmalloc.org, porta 5222).
<a href="https://chat.kmalloc.org/">apri</a>.
</p>
<h2 id="matrix">Matrix</h2>
<p>
Un homeserver Matrix: indirizzo @nome:kmalloc.org. Usa il client web Element o qualsiasi app Matrix con homeserver matrix.kmalloc.org.
<a href="https://element.kmalloc.org/">apri</a>.
</p>
<h2 id="meet">Video conferences</h2>
<p>
Videoconferenze con Jitsi Meet. Chiunque abbia il link può entrare in una stanza; per crearne una serve un account.
<a href="https://meet.kmalloc.org/">apri</a>.
</p>
<h2 id="donate">Sostieni kmalloc.org</h2>
<p>
Le donazioni sono benvenute e aiutano a tenere acceso il server. Indirizzo Bitcoin:
<a href="bitcoin:{{btc}}"><code>{{btc}}</code></a>
</p>
<h2 id="terms">Da sapere</h2>
<p>
Tutto è gestito da una persona su un solo server, con backup notturni cifrati e nessuna garanzia di disponibilità. Siate rispettosi: il manifesto spiega in cosa crediamo.
</p>

5
content/site.toml Normal file
View file

@ -0,0 +1,5 @@
# Values shared by every page.
base_url = "https://kmalloc.org"
manifesto_version = "1.0"
contact = "squid@kmalloc.org"
btc = "bc1qsj5qadrzlqmfwcru4fwuqvftg833te5f9mja2c"