- Python 39.1%
- HTML 34.8%
- CSS 26.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- build /news/feed.xml and /it/news/feed.xml with the latest 20 posts, full text and absolute links - add the feed autodiscovery link to every page and a visible link on the news pages - document the feed in the README |
||
| badges | ||
| content | ||
| fonts | ||
| logo | ||
| static | ||
| templates | ||
| .gitignore | ||
| build.py | ||
| MANIFESTO.en.md | ||
| MANIFESTO.it.md | ||
| README.md | ||
kmalloc.org
Sources of the kmalloc.org website: plain static HTML, no JavaScript, valid HTML5 and CSS.
Layout
build.pygenerates the site:python3 build.py [output-dir](defaultpreview/). Standard library only.templates/holds the page chrome:base.html,header.html,footer.htmland a few small fragments.static/style.cssis the one stylesheet, inlined into every page.content/site.tomlholds the values shared by every page: contact address, Bitcoin address, manifesto version.content/<lang>/lang.tomlholds the chrome strings of one language (en,it).content/<lang>/*.htmlare the pages: a front matter block, then an HTML fragment.content/<lang>/news/holds the news posts.MANIFESTO.en.mdandMANIFESTO.it.mdare the manifesto texts, version 1.0.fonts/terminess.woff2is 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 inlogo/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/<lang>/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 (/it/news/slug.html for Italian). A post with the same file name in both languages is linked as a translation. The news index, the latest three posts on the home page and an RSS 2.0 feed (/news/feed.xml, /it/news/feed.xml, the latest 20 posts with full text) are built from the files. Every page links its feed in the head. No em dashes: the build refuses them.
Publishing
I check every page with the Nu HTML Checker, then copy the output to the web root on the server.