The static site generator of kmalloc.org
  • Go 98.6%
  • Shell 0.7%
  • JavaScript 0.5%
  • Makefile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
semantic-release-bot aafc15baf4 chore(release): 1.0.0 [skip ci]
## 1.0.0 (2026-11-15)

### Features

* add the build and version commands ([2c39754](2c3975430b))
* assemble the site from content, templates and assets ([6bdf2ca](6bdf2ca05f))
* build the news lists, category lists and the feed ([2f5cb15](2f5cb15f21))
* let a heading set its own id with {[#id](https://git.kmalloc.org/squid/motorino/issues/id)} ([a850e9e](a850e9ed41))
* let a page say which manifesto version it translates ([0148306](0148306a64))
* load pages and news with dated paths and categories ([51071e6](51071e6fb2))
* load site.json and the language files ([97af0c4](97af0c422d))
* parse the Key: value header with a "-" terminator ([a3b0a80](a3b0a8028e))
* render Markdown with stable heading ids and the em dash rule ([2c7bca3](2c7bca35be))
* substitute placeholders and escape text ([27dac18](27dac18c8f))

### Bug Fixes

* escape the title attribute, refuse clashing addresses and unsafe paths, check Switch ([1298a98](1298a98f30))
* give no id to the level 1 heading ([935bf39](935bf3958f))
2026-11-15 10:05:43 +01:00
cmd/motorino feat: add the build and version commands 2026-11-15 09:51:52 +01:00
internal fix: escape the title attribute, refuse clashing addresses and unsafe paths, check Switch 2026-11-15 10:03:58 +01:00
scripts chore: add the release publishing script 2026-11-15 10:05:13 +01:00
.gitignore chore: add the GPL 3 licence and the ignore list 2026-11-15 09:35:33 +01:00
CHANGELOG.md chore(release): 1.0.0 [skip ci] 2026-11-15 10:05:43 +01:00
go.mod feat: render Markdown with stable heading ids and the em dash rule 2026-11-15 09:43:26 +01:00
go.sum feat: render Markdown with stable heading ids and the em dash rule 2026-11-15 09:43:26 +01:00
LICENSE chore: add the GPL 3 licence and the ignore list 2026-11-15 09:35:33 +01:00
Makefile chore: scaffold the module, tooling and release config 2026-11-15 09:41:05 +01:00
package-lock.json chore: scaffold the module, tooling and release config 2026-11-15 09:41:05 +01:00
package.json chore: scaffold the module, tooling and release config 2026-11-15 09:41:05 +01:00
README.md feat: let a page say which manifesto version it translates 2026-11-15 09:57:09 +01:00
release.config.mjs chore: scaffold the module, tooling and release config 2026-11-15 09:41:05 +01:00

motorino

The static site generator of kmalloc.org. It turns Markdown pages, news, templates and language files into plain HTML with no JavaScript. It is made for that one site and is not a general-purpose generator.

Licence: GPL-3.0-or-later, see LICENSE.

Usage

motorino build -site DIR -out DIR    build the site in DIR into the output folder (defaults: . and public)
motorino version                     print the version

The binary is a single static Go program. The version comes from semantic-release.

What a site looks like

site.json                    shared strings (contact, addresses, base_url), the language list, the assets
lang/<lang>.json             menu, footer and other interface strings of one language
content/<lang>/**/*.md       the pages; index.md is the home of a folder
news/<name>.md               the news, one file each
templates/**/*.html          the page chrome, the layouts, the news post and category page
static/style.css             the stylesheet, inlined in every page

The first language in site.json is the default and lives at the root of the site; the others live under /<lang>/.

Header

Every page and every news file starts with lines of Key: value, ended by a line that holds a single -. The body is Markdown, and raw HTML is allowed in it.

News:

Title: GNU/Linux Day 2026
Author: Matteo Bini
Date: 2026-09-18T17:00:45+0200
Categories: Linux Day, FLUG
Description: An optional one-line summary.
-
The text of the news.

A news file news/name.md is published as /news/YYYY/MM/name.html, with the year and the month of Date as written. Every category gets a page, /news/category/<name>.html.

Pages: Title, ID (the same in every language, it links the translations), Description, and optionally Layout (page, bare or manifesto), Note, Switch (lang=/path, lang=/path, overrides the language links) and ManifestoVersion and ManifestoDate (a translation of an older manifesto says which version it translates).

Placeholders

{{name}}, with lowercase letters, digits and underscores, is replaced by a string from site.json or the language file. An unknown placeholder stops the build and names the file. {{news_list}}, {{latest_news}} and {{categories_list}} stand alone in a paragraph and expand to generated lists.

Development

make check    gofmt, go vet, staticcheck and the tests
make build    a local binary in bin/motorino
make dist     the release binary and its SHA-256 in dist/

Go code has a doc comment on every package and declaration, and is formatted with gofmt. Commits follow conventional commits.

Release

semantic-release is run by hand from a clean main: npm run release:dry, then npm run release. It tags vX.Y.Z, updates CHANGELOG.md, builds the linux/amd64 binary and publishes it, with its SHA-256, as a release on this repository. The site deploy pins a version and checks the hash before it runs the binary.