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 8c3f4d29f7 feat: add the status page news and publish the site on every push to main
- add the news post about status.kmalloc.org
- document the automatic publishing in the README
2026-11-12 19:06:28 +01:00
badges feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
content feat: add the status page news and publish the site on every push to main 2026-11-12 19:06:28 +01:00
fonts feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
logo refactor: split the site generator into templates and content, add news 2026-11-12 18:34:55 +01:00
static fix: show the RSS icon and the W3C badges on one line at the same height 2026-11-12 18:45:58 +01:00
templates fix: show the RSS icon and the W3C badges on one line at the same height 2026-11-12 18:45:58 +01:00
.gitignore feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
build.py fix: show the RSS icon and the W3C badges on one line at the same height 2026-11-12 18:45:58 +01:00
MANIFESTO.en.md feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
MANIFESTO.it.md feat: add kmalloc.org website generator, manifesto and logo sources 2026-11-12 17:18:33 +01:00
README.md feat: add the status page news and publish the site on every push to main 2026-11-12 19:06:28 +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.
  • templates/ holds the page chrome: base.html, header.html, footer.html and a few small fragments.
  • static/style.css is the one stylesheet, inlined into every page.
  • content/site.toml holds the values shared by every page: contact address, Bitcoin address, manifesto version.
  • content/<lang>/lang.toml holds the chrome strings of one language (en, it).
  • content/<lang>/*.html are the pages: a front matter block, then an HTML fragment.
  • content/en/news/ holds the news posts. News are written in English only.
  • MANIFESTO.en.md and MANIFESTO.it.md are the manifesto texts, version 1.0.
  • fonts/terminess.woff2 is Terminess (Terminus), SIL Open Font License, subset to Latin.
  • badges/ holds the official W3C badges, served from our own site.
  • logo/ holds the shrike logo: SVG and PNG exports, build_logo.py, the original PNG and the favicons in logo/web/.

Pages

A page starts with a front matter block, then the HTML fragment:

---
id: people
path: /people.html
nav: people
title: kmalloc.org: People
description: The people behind kmalloc.org.
---
<h1>People</h1>

id pairs a page with its translation, nav is the menu entry to highlight. Placeholders such as {{contact_shown}} or {{url_news}} 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 content/en/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 Italian pages 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.

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.