Sources of the kmalloc.org website
  • Python 39.1%
  • HTML 34.8%
  • CSS 26.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
squid 0e8c9a9126
All checks were successful
check / check (push) Successful in 17s
docs: write the site and the manifesto in the first person singular
The project is one person today, so the pages say "I" and "my" instead of "we" and "our": home, services, projects,
why-kmalloc, README and the news that quoted the manifesto, in Italian and English. "Today squid decides" and
"Today squid pays" become "Today I decide" and "Today I pay".

The manifesto is written the same way in Italian, English, Spanish, German and French. The preamble paragraph that
explained why it said "we" now says that one person writes it and that it stays open. Universal statements (nobody
needs something to hide) are impersonal, and sentences that would need a grammatical gender are written without one.
No principle changes.
2026-11-17 14:56:29 +01:00
.forgejo/workflows ci: build the site with the pinned motorino and check it on every pull request 2026-11-15 10:23:31 +01:00
badges feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
content docs: write the site and the manifesto in the first person singular 2026-11-17 14:56:29 +01:00
lang feat(news): news in blog style 2026-11-16 12:12:27 +01:00
logo feat: rust Dissent in the hero, shrike mark in the header and link preview metadata 2026-11-14 11:08:38 +01:00
news docs: write the site and the manifesto in the first person singular 2026-11-17 14:56:29 +01:00
static style(news): drop the article rules, the lists use the note panel 2026-11-16 12:32:31 +01:00
templates feat(news): news in blog style 2026-11-16 12:12:27 +01:00
.gitignore chore: ignore the capsule and public output folders 2026-11-16 12:49:17 +01:00
.motorino-version chore: build the site with motorino 1.3.0 2026-11-16 12:57:09 +01:00
LICENSE chore: remove the Python generator and the migration tools 2026-11-15 10:11:29 +01:00
README.md docs: write the site and the manifesto in the first person singular 2026-11-17 14:56:29 +01:00
site.json feat: settings for the Gemini capsule 2026-11-16 12:28:21 +01:00

kmalloc.org

Sources of the kmalloc.org website: plain static HTML, no JavaScript, valid HTML5 and CSS. The site is built with motorino, the generator I wrote for it.

Layout

  • content/<lang>/ holds the pages as Markdown, one file per page and language (en, it, es, de, fr). index.md is the home of a folder. The file path is the address: content/it/servizi.md is /it/servizi.html.
  • news/ holds the news, written in English only: one name.md file each.
  • site.json holds what every language shares: the language list, the contact and security addresses, the Bitcoin and shop addresses, the manifesto version and date, and the assets that are copied as they are.
  • lang/<lang>.json holds the interface strings of one language: the menu, the footer and the other short texts.
  • templates/ holds the chrome (base.html, header.html, footer.html), the layouts in templates/pages/ (page, bare, manifesto), the news post (post.html) and the category page (category.html).
  • static/style.css is the one stylesheet, inlined into every page.
  • badges/ holds the official W3C badges, served from my own site.
  • logo/ holds the shrike logo: SVG and PNG exports (og-1200x630.png is the preview image of shared links), build_logo.py, the original PNG and the favicons in logo/web/.
  • .motorino-version pins the version of motorino (line 1) and the SHA-256 of its linux/amd64 binary (line 2).

Writing a page

Every page starts with a header of Key: value lines ended by a line with a single -, then Markdown. Raw HTML is allowed, for the few things Markdown cannot say (the data table, the hero of the home page).

Title: Services
ID: services
Description: The services on kmalloc.org and how to get an account.
Layout: bare
-
# Services

Write to **{{contact_shown}}**.

## Get an account {#account}

ID is the same in every language: it links the translations. Layout is page (the title as a heading, then the body), bare (the body only, which writes its own # heading) or manifesto. A heading can set its id with {#id}; the others get one from their words. {{name}} is replaced by a string of site.json or of the language file, and an unknown one stops the build. {{news_list}}, {{latest_news}} and {{categories_list}} stand alone in a paragraph and expand to lists. The full list of keys is in the motorino README.

The English text of the manifesto prevails. English and Italian are updated together when the manifesto changes; Spanish, German and French follow in a batch, translated from the English with the wording of the earlier translation kept where the English did not change, and their Note always says which version they translate (it is a machine translation that no native speaker has reviewed). Until a batch is done, a translation may be behind; set ManifestoVersion and ManifestoDate on it so that the page does not show the current version.

A new language is one file lang/<lang>.json, its name in site.json and its pages in content/<lang>/. A language lists only the pages it has: Spanish, German and French have the manifesto only, so they use the short header ("header": "header-min"). A translation of an older manifesto says which version it translates with ManifestoVersion and ManifestoDate.

News

A news item is a file news/name.md:

Title: Hello from kmalloc.org
Author: squid
Date: 2026-09-18T17:00:45+0200
Categories: News
Description: One line shown in the list.
-
The text, with a [link](https://kmalloc.org/) and `code`.

It is published at /news/YYYY/MM/name.html, with the year and month of Date. Every category has a page at /news/category/<name>.html. The news index, the latest three news on the home pages and an RSS 2.0 feed (/news/feed.xml, the latest 20 news with full text) are built from the files. No em dashes: the build refuses them. The first three news also answer at their old addresses (/news/status-page.html and so on) through permanent redirects in the Caddyfile of shrike-infra.

Preview

motorino build -site . -out preview
cd preview && python3 -m http.server 8197 --bind 127.0.0.1

Get the binary of the pinned version from the releases of motorino, or build it from its repository with make build. I check the output with the Nu HTML Checker before I push.

Indexing

Every page, news item and category page may be indexed. robots.txt allows exactly their addresses and blocks the rest (the downloads and the assets). The personal pages under /~name/ are not built here and carry noindex.

License

The texts are released under CC BY-SA 4.0, see LICENSE. The code and the logo are not covered; the logo pack has its own terms in its README.

Publishing

Pushing to main publishes the site. A post-receive hook in the Forgejo repository touches a trigger file, deploy-kmalloc-site.path on the server notices it and runs deploy-kmalloc-site. The script builds main into a temporary directory with the pinned motorino and mirrors it into the web root. It downloads the binary once, checks it against the hash in .motorino-version and keeps it in /var/cache/kmalloc-deploy. If the hash or the build is wrong nothing is copied.

To move to a new motorino: take the version and the SHA-256 from its release and write them in .motorino-version.

A Forgejo Actions workflow (.forgejo/workflows/check.yml) builds the site with the pinned motorino and runs the Nu HTML Checker on every page, on every push to main and on every pull request, on the shared runner of git.kmalloc.org. The publishing itself stays the hook on the server.