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
2026-11-15 09:10:03 +00:00
badges feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
content feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +01:00
lang feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +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 feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +01:00
static feat: offer the logos as a downloadable pack and announce the shop 2026-11-14 20:05:44 +01:00
templates feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +01:00
tools feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +01:00
.gitignore feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
.motorino-version chore: pin motorino 1.0.0 with the SHA-256 of its binary 2026-11-15 10:06:30 +01:00
build.py feat: let search engines index the site pages and the news 2026-11-14 20:35:16 +01:00
LICENSE feat: add data, funds, rules of use and history pages 2026-11-13 12:40:07 +01:00
MANIFESTO.de.md feat: add the manifesto in Spanish, German and French 2026-11-12 19:54:17 +01:00
MANIFESTO.en.md feat: manifesto 1.2 with two points on secularism 2026-11-14 13:48:18 +01:00
MANIFESTO.es.md feat: add the manifesto in Spanish, German and French 2026-11-12 19:54:17 +01:00
MANIFESTO.fr.md feat: add the manifesto in Spanish, German and French 2026-11-12 19:54:17 +01:00
MANIFESTO.it.md feat: manifesto 1.2 with two points on secularism 2026-11-14 13:48:18 +01:00
README.md feat: link the merchandise shop from the Funding section 2026-11-14 19:50:18 +01:00
site.json feat: move the pages to Markdown and the news to the dated layout 2026-11-15 09:58:10 +01:00

kmalloc.org

Sources of the kmalloc.org website: plain static HTML, no JavaScript, valid HTML5 and CSS.

Layout

  • build.py generates the site: python3 build.py [output-dir] (default preview/). Standard library only.
  • site.json holds what every language shares: the language list, contact address, Bitcoin address, shop address, manifesto version, services and people.
  • lang/<lang>.json holds every text of one language (en, it, es, de, fr): the menu, the footer and one entry per page. The texts are plain text and the build escapes them.
  • templates/ holds the chrome (base.html, header.html, footer.html), one body per page type in templates/pages/ and repeated blocks in templates/parts/.
  • static/style.css is the one stylesheet, inlined into every page.
  • MANIFESTO.<lang>.md are the manifesto texts. English and Italian are at version 1.2 (manifesto_version and manifesto_date in site.json); Spanish, German and French are machine translations of version 1.0 (overridden in their lang/<lang>.json) and show a note that the English text prevails. Every version is listed on the manifesto history page.
  • news/ holds the news posts, written in English only.
  • badges/ holds the official W3C badges, served from our 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/.

Languages

A new language is one file, lang/<lang>.json, plus its name in site.json and a MANIFESTO.<lang>.md. 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") and the other pages are not built for them. The language links in the header list every other language that has the same page.

A page entry in lang/<lang>.json looks like this:

"people": {
  "path": "/people.html",
  "title": "kmalloc.org: People",
  "description": "The people behind kmalloc.org.",
  "intro": "Who is behind kmalloc.org.",
  "bios": { "squid": "..." }
}

The page types are home, manifesto, people, services, news and history (the manifesto history). A list of plain strings in a page entry becomes <li> items. Placeholders such as {{intro}} or {{url_news}} in templates/pages/*.html are replaced at build time, and an unknown placeholder stops the build.

News

A post is a Markdown file named YYYY-MM-DD-slug.md in news/:

---
title: Hello
summary: One line shown in the list.
---
Text with a [link](https://kmalloc.org/) and `code`.

## A heading

The post is published at /news/slug.html. News are English only: the pages of the other languages list the same posts and link to them. The news index, the latest three posts on the home pages and an RSS 2.0 feed (/news/feed.xml, the latest 20 posts with full text) are built from the files. Every page links the feed in the head and shows the RSS icon in the footer. No em dashes: the build refuses them.

Indexing

Only the home pages and the manifesto pages may be indexed (INDEXABLE in build.py): they have no robots meta tag and robots.txt allows exactly their paths. Every other page has noindex, nofollow, noarchive and is blocked in robots.txt.

License

The texts are released under CC BY-SA 4.0, see LICENSE. The code and the logo are not covered.

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, which builds main into a temporary directory and mirrors it into the web root. If the build fails nothing is copied.

I check every page with the Nu HTML Checker before pushing.