From 21103486f8ec1a06958ef9d20d4a4d06833d9f20 Mon Sep 17 00:00:00 2001 From: squid Date: Thu, 12 Nov 2026 19:59:56 +0100 Subject: [PATCH] refactor: keep every text in one JSON file per language - move the texts of each language into lang/.json and the shared data into site.json - replace the per-language HTML fragments with one template per page type in templates/pages - add templates/parts for the repeated service and person blocks - move the news posts to news/ - a language lists only the pages it has, so adding one is a single file - the generated pages are unchanged - update the README --- README.md | 38 +-- build.py | 313 ++++++++++-------- content/de/lang.toml | 15 - content/de/manifesto.html | 24 -- content/en/index.html | 58 ---- content/en/lang.toml | 20 -- content/en/manifesto.html | 20 -- content/en/news.html | 18 - content/en/news/.gitkeep | 0 content/en/people.html | 23 -- content/en/services.html | 83 ----- content/es/lang.toml | 15 - content/es/manifesto.html | 24 -- content/fr/lang.toml | 15 - content/fr/manifesto.html | 24 -- content/it/index.html | 59 ---- content/it/lang.toml | 20 -- content/it/manifesto.html | 20 -- content/it/persone.html | 23 -- content/it/servizi.html | 83 ----- content/site.toml | 5 - lang/de.json | 23 ++ lang/en.json | 110 ++++++ lang/es.json | 23 ++ lang/fr.json | 23 ++ lang/it.json | 106 ++++++ .../news => news}/2026-11-12-status-page.md | 0 site.json | 76 +++++ templates/pages/home.html | 44 +++ templates/pages/manifesto.html | 13 + templates/pages/news.html | 11 + templates/pages/people.html | 7 + templates/pages/services.html | 27 ++ templates/parts/person-card.html | 9 + templates/parts/service-section.html | 7 + 35 files changed, 675 insertions(+), 704 deletions(-) delete mode 100644 content/de/lang.toml delete mode 100644 content/de/manifesto.html delete mode 100644 content/en/index.html delete mode 100644 content/en/lang.toml delete mode 100644 content/en/manifesto.html delete mode 100644 content/en/news.html delete mode 100644 content/en/news/.gitkeep delete mode 100644 content/en/people.html delete mode 100644 content/en/services.html delete mode 100644 content/es/lang.toml delete mode 100644 content/es/manifesto.html delete mode 100644 content/fr/lang.toml delete mode 100644 content/fr/manifesto.html delete mode 100644 content/it/index.html delete mode 100644 content/it/lang.toml delete mode 100644 content/it/manifesto.html delete mode 100644 content/it/persone.html delete mode 100644 content/it/servizi.html delete mode 100644 content/site.toml create mode 100644 lang/de.json create mode 100644 lang/en.json create mode 100644 lang/es.json create mode 100644 lang/fr.json create mode 100644 lang/it.json rename {content/en/news => news}/2026-11-12-status-page.md (100%) create mode 100644 site.json create mode 100644 templates/pages/home.html create mode 100644 templates/pages/manifesto.html create mode 100644 templates/pages/news.html create mode 100644 templates/pages/people.html create mode 100644 templates/pages/services.html create mode 100644 templates/parts/person-card.html create mode 100644 templates/parts/service-section.html diff --git a/README.md b/README.md index 6707024..93520a7 100644 --- a/README.md +++ b/README.md @@ -5,35 +5,35 @@ Sources of the kmalloc.org website: plain static HTML, no JavaScript, valid HTML ## 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. +- `site.json` holds what every language shares: the language list, contact address, Bitcoin address, manifesto version, services and people. +- `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. -- `content/site.toml` holds the values shared by every page: contact address, Bitcoin address, manifesto version. -- `content//lang.toml` holds the chrome strings of one language (`en`, `it`, `es`, `de`, `fr`). Spanish, German and French have the manifesto only and use the short header (`templates/header-min.html`). -- `content//*.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. `MANIFESTO.es.md`, `MANIFESTO.de.md` and `MANIFESTO.fr.md` are translations of it. +- `MANIFESTO..md` are the manifesto texts, version 1.0. English and Italian are the sources, Spanish, German and French are translations. +- `news/` holds the news posts, written in English only. - `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 +## Languages -A page starts with a front matter block, then the HTML fragment: +A new language is one file, `lang/.json`, plus its name in `site.json` and a `MANIFESTO..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. - --- - id: people - path: /people.html - nav: people - title: kmalloc.org: People - description: The people behind kmalloc.org. - --- -

People

+A page entry in `lang/.json` looks like this: -`id` pairs a page with its translations, `nav` is the menu entry to highlight. The language links in the header list every other language that has a page with the same `id`. Placeholders such as `{{contact_shown}}` or `{{url_news}}` are replaced at build time, and an unknown placeholder stops the build. + "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` and `news`. 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 `content/en/news/`: +A post is a Markdown file named `YYYY-MM-DD-slug.md` in `news/`: --- title: Hello @@ -43,7 +43,7 @@ A post is a Markdown file named `YYYY-MM-DD-slug.md` in `content/en/news/`: ## 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. +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. ## Publishing diff --git a/build.py b/build.py index 4fb9802..12335cb 100644 --- a/build.py +++ b/build.py @@ -4,36 +4,38 @@ Usage: build.py [output-dir] (default: preview) Layout: - templates/ page chrome: base.html, header.html, footer.html, ... + site.json what every language shares: languages, contact, Bitcoin address, services, people + lang/.json every text of one language: menu, footer, and one entry per page it has + templates/ page chrome (base, header, footer), page bodies (pages/) and repeated blocks (parts/) static/style.css the one stylesheet, inlined into every page - content/site.toml values shared by every page (contact, bitcoin address, manifesto version) - content//lang.toml the chrome strings of one language - content//*.html pages: front matter, then an HTML fragment - content/en/news/*.md news posts, English only: YYYY-MM-DD-slug.md, front matter, then Markdown + MANIFESTO..md the manifesto, one Markdown file per language + news/*.md news posts, English only: YYYY-MM-DD-slug.md, front matter, then Markdown -A page starts with a front matter block: - --- - id: people pairs the page with its translation - path: /people.html where it is published - nav: people menu entry highlighted on this page - title: ... - description: ... - --- -Placeholders {{name}} are replaced with values from site.toml, lang.toml and the page itself. -An unknown placeholder stops the build.""" -import html, os, re, shutil, sys, tomllib -from email.utils import format_datetime +To add a language, add lang/.json and list it in site.json. A language needs only the pages it has: +a page that is missing from lang/.json is simply not built, and its language links disappear. +Texts in the JSON files are plain text: the build escapes them. Placeholders {{name}} in the templates are +replaced with values from site.json, the language file and the page; an unknown placeholder stops the build.""" +import html, json, os, re, shutil, sys from datetime import datetime, timezone +from email.utils import format_datetime from xml.sax.saxutils import escape as xml_escape HERE = os.path.dirname(os.path.abspath(__file__)) OUT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, "preview")) -LANGS = ("en", "it", "es", "de", "fr") # order of the language links -NAV = ("home", "manifesto", "people", "services", "news") NEWS_ON_HOME = 3 NEWS_IN_FEED = 20 POST_NAME = re.compile(r"^(\d{4}-\d{2}-\d{2})-([a-z0-9]+(?:-[a-z0-9]+)*)$") +# Page types: menu entry to highlight and footer lead. The body is templates/pages/.html. +PAGES = { + "home": dict(nav="home", lead="home"), + "manifesto": dict(nav="manifesto", lead="back"), + "people": dict(nav="people", lead="back"), + "services": dict(nav="services", lead="back"), + "news": dict(nav="news", lead="back"), +} +NAV = ("home", "manifesto", "people", "services", "news") + # Files copied as they are: published name -> source. ASSETS = { "favicon.svg": "logo/svg/favicon-auto.svg", @@ -63,9 +65,15 @@ def write(rel, text): f.write(text) -def toml(*parts): - with open(os.path.join(HERE, *parts), "rb") as f: - return tomllib.load(f) +def load_json(*parts): + try: + return json.loads(read(*parts)) + except ValueError as e: + fail(f"{'/'.join(parts)}: {e}") + + +def esc(text): + return html.escape(text, quote=False) def parse(text, name): @@ -186,41 +194,29 @@ def md_to_html(md): # ---------------------------------------------------------------- site model -def load_pages(lang): - """Pages of one language: static pages from content//*.html and posts from content//news/*.md.""" - pages = [] - folder = os.path.join(HERE, "content", lang) - for fn in sorted(os.listdir(folder)): - if fn.endswith(".html"): - meta, body = parse(read("content", lang, fn), f"content/{lang}/{fn}") - for key in ("id", "path", "nav", "title", "description"): - if key not in meta: - fail(f"content/{lang}/{fn}: front matter lacks '{key}'") - if meta["nav"] not in NAV: - fail(f"content/{lang}/{fn}: unknown nav '{meta['nav']}'") - pages.append(dict(meta, lang=lang, kind="page", body=body, src=f"content/{lang}/{fn}")) - news_dir = os.path.join(folder, "news") - if os.path.isdir(news_dir): - prefix = "" if lang == "en" else "/it" - for fn in sorted(os.listdir(news_dir)): - if not fn.endswith(".md"): - continue - m = POST_NAME.match(fn[:-3]) - if not m: - fail(f"content/{lang}/news/{fn}: name must be YYYY-MM-DD-slug.md") - src = f"content/{lang}/news/{fn}" - meta, body = parse(read("content", lang, "news", fn), src) - if "title" not in meta: - fail(f"{src}: front matter lacks 'title'") - if "—" in body or "—" in meta["title"]: - fail(f"{src}: no em dashes, please") - pages.append(dict(meta, lang=lang, kind="post", id="news/" + fn[:-3], date=m.group(1), nav="news", - path=f"{prefix}/news/{m.group(2)}.html", body=body, src=src, - description=meta.get("summary", meta["title"]))) - return pages +def load_posts(): + """News posts from news/*.md (English only).""" + posts = [] + folder = os.path.join(HERE, "news") + for fn in sorted(os.listdir(folder)) if os.path.isdir(folder) else []: + if not fn.endswith(".md"): + continue + m = POST_NAME.match(fn[:-3]) + if not m: + fail(f"news/{fn}: name must be YYYY-MM-DD-slug.md") + src = f"news/{fn}" + meta, text = parse(read("news", fn), src) + if "title" not in meta: + fail(f"{src}: front matter lacks 'title'") + if "\u2014" in text or "\u2014" in meta["title"]: + fail(f"{src}: no em dashes, please") + posts.append(dict(lang="en", kind="post", id="news/" + fn[:-3], date=m.group(1), nav="news", + path=f"/news/{m.group(2)}.html", body=text, src=src, title=meta["title"], + summary=meta.get("summary", ""), description=meta.get("summary") or meta["title"])) + return sorted(posts, key=lambda p: p["date"], reverse=True) -def rss(lang, st, site, all_posts): +def rss(L, site, all_posts): """RSS 2.0 feed of the news (English only): the latest posts, full text, absolute links.""" base = site["base_url"] posts = all_posts[:NEWS_IN_FEED] @@ -239,14 +235,14 @@ def rss(lang, st, site, all_posts): """) built = f"{stamp(posts[0]['date'])}\n" if posts else "" - url = f"{base}{st['url_news']}" + url = f"{base}{site['news_url']}" return f""" -kmalloc.org: {xml_escape(st["nav_news"])} +kmalloc.org: {xml_escape(L["nav"]["news"])} {url} -{xml_escape(st["news_p"])} -{lang} +{xml_escape(L["news_p"])} +{L["lang"]} {built} {"".join(items)} @@ -254,99 +250,144 @@ def rss(lang, st, site, all_posts): def build(): + site = load_json("site.json") + langs_order = site["languages"] + langs = {l: load_json("lang", l + ".json") for l in langs_order} css = read("static", "style.css").strip("\n") - tpl = {n[:-5]: read("templates", n) for n in os.listdir(os.path.join(HERE, "templates")) if n.endswith(".html")} - site = toml("content", "site.toml") - site["contact_shown"] = site["contact"].replace("@", " (at) ") # no mailto link, against address harvesters - strings = {lang: toml("content", lang, "lang.toml") for lang in LANGS} - pages = {lang: load_pages(lang) for lang in LANGS} - by_id = {(p["id"], p["lang"]): p for lang in LANGS for p in pages[lang]} + tpl = {} + for root, _, files in os.walk(os.path.join(HERE, "templates")): + for fn in files: + if fn.endswith(".html"): + key = os.path.relpath(os.path.join(root, fn), os.path.join(HERE, "templates"))[:-5] + tpl[key] = read("templates", key + ".html") + shared = {k: v for k, v in site.items() if isinstance(v, str)} + shared["contact_shown"] = site["contact"].replace("@", " (at) ") # no mailto link, against address harvesters + svc = {s["id"]: s for s in site["services"]} - # Manifesto: the user's own Markdown files, rendered once per language. + pages = [] + for lang in langs_order: + for pid, spec in PAGES.items(): + data = langs[lang]["pages"].get(pid) + if data: + pages.append(dict(lang=lang, kind="page", id=pid, nav=spec["nav"], lead=spec["lead"], path=data["path"], + title=data["title"], description=data["description"], data=data, src=f"lang/{lang}.json: {pid}")) + posts = load_posts() + pages += posts + by_id = {(p["id"], p["lang"]): p for p in pages} + if ("news", "en") not in by_id: + fail("lang/en.json needs a 'news' page") + site["news_url"] = by_id[("news", "en")]["path"] + + def url_for(lang, pid): + """Page in this language, else the English one.""" + return (by_id.get((pid, lang)) or by_id[(pid, "en")])["path"] + + # Manifesto: one Markdown file per language that has the page. manifesto = {} - for lang in LANGS: - title, toc, body = md_to_html(no_em_dash(read(f"MANIFESTO.{lang}.md"))) - manifesto[lang] = dict( - manifesto_title=html.escape(title), - manifesto_toc="\n".join(f'
  • {inline(h)}
  • ' for sl, h in toc), - manifesto_body=body) - - # News are written in English only; every language lists the same posts. - posts_en = sorted((p for p in pages["en"] if p["kind"] == "post"), key=lambda p: p["date"], reverse=True) + for lang in langs_order: + if ("manifesto", lang) in by_id: + title, toc, md_html = md_to_html(no_em_dash(read(f"MANIFESTO.{lang}.md"))) + manifesto[lang] = dict( + manifesto_title=html.escape(title), + manifesto_toc="\n".join(f'
  • {inline(h)}
  • ' for sl, h in toc), + manifesto_body=md_html) def news_lists(lang): - posts = posts_en mark = "" if lang == "en" else ' hreflang="en" lang="en"' + lines = [] + for p in posts: + line = f'
  • {esc(p["title"])}' + if p["summary"]: + line += ": " + esc(p["summary"]) + lines.append(line + "
  • ") + full = "
      \n" + "\n".join(lines) + "\n
    " if posts else f"

    \n{esc(langs[lang].get('news_empty', ''))}\n

    " + short = "\n".join(f'
  • {esc(x["title"])}
  • ' + for x in posts[:NEWS_ON_HOME]) + return full, short - def li(p): - line = f'
  • {html.escape(p["title"], quote=False)}' - if p.get("summary"): - line += ": " + html.escape(p["summary"], quote=False) - return line + "
  • " - items = "\n".join(li(p) for p in posts) - full = f"
      \n{items}\n
    " if posts else f"

    \n{strings[lang].get('news_empty', '')}\n

    " - return full, items, posts[:NEWS_ON_HOME], mark + for p in pages: + lang = p["lang"] + L = langs[lang] + name = p["src"] + ctx = dict(shared) + ctx.update({k: esc(v) for k, v in L.items() if isinstance(v, str)}) + ctx["lang"] = lang + for k, label in L["nav"].items(): + ctx["nav_" + k] = esc(label) + for k in NAV[1:]: + ctx["url_" + k] = url_for(lang, k) + ctx["version_lc"] = esc(L["version"].lower()) + data = p.get("data", {}) + ctx.update({k: esc(v) for k, v in data.items() if isinstance(v, str)}) + page_title = p["title"] if p["kind"] == "page" else "kmalloc.org: " + p["title"] + ctx.update(css=css, path=p["path"], title_html=html.escape(page_title), post_title=html.escape(p["title"]), + description_attr=html.escape(p["description"], quote=True), doc_url=site["base_url"] + p["path"], + date=p.get("date", "")) + for k in NAV: + ctx["cur_" + k] = ' aria-current="page"' if p["nav"] == k else "" - news = {lang: news_lists(lang) for lang in LANGS} + # Every other language that has this page; a page without translation (news) points to the other home. + twins = {l: by_id[(p["id"], l)] for l in langs_order if l != lang and (p["id"], l) in by_id} + if not twins: + fallback = "it" if lang == "en" else "en" + twins = {fallback: by_id[("home", fallback)]} + switch = data.get("switch", {}) + ctx["lang_links"] = "\n·\n".join( + f'{esc(langs[l]["lang_name"])}' for l, t in twins.items()) + have = {l: by_id[(p["id"], l)] for l in langs_order if (p["id"], l) in by_id} + ctx["alt_links"] = "\n".join(f'' for l, q in have.items()) if len(have) > 1 else "" - for lang in LANGS: - st = strings[lang] - for p in pages[lang]: - name = p["src"] - ctx = dict(site, **st, **manifesto[lang]) - page_title = p["title"] if p["kind"] == "page" else "kmalloc.org: " + p["title"] - ctx.update(css=css, title=p["title"], description=p["description"], path=p["path"], - title_html=html.escape(page_title), post_title=html.escape(p["title"]), description_attr=html.escape(p["description"], quote=True), - doc_url=site["base_url"] + p["path"], date=p.get("date", "")) - for k in NAV: - ctx["cur_" + k] = ' aria-current="page"' if p["nav"] == k else "" - # Every other language that has this page; a page without translation (news) points to the other home. - twins = {l: by_id[(p["id"], l)] for l in LANGS if l != lang and (p["id"], l) in by_id} - if not twins: - fallback = "it" if lang == "en" else "en" - twins = {fallback: by_id[("home", fallback)]} - links = [] - for l, t in twins.items(): - href = p["switch"] if p.get("switch") and l == "en" else t["path"] - links.append(f'{strings[l]["lang_name"]}') - ctx["lang_links"] = "\n·\n".join(links) - have = {l: by_id[(p["id"], l)] for l in LANGS if (p["id"], l) in by_id} - ctx["alt_links"] = "\n".join(f'' for l, q in have.items()) if len(have) > 1 else "" + if p["kind"] == "post": + _, _, post_html = md_to_html(p["body"]) + ctx["post_body"] = post_html + content = render(tpl["news-post"], ctx, "templates/news-post.html") + lead = "news" + else: + body_tpl = tpl["pages/" + p["id"]] + if "{{news_list}}" in body_tpl: + ctx["news_list"] = news_lists(lang)[0] + if "{{latest_news}}" in body_tpl: + short = news_lists(lang)[1] + ctx["latest_news"] = render(tpl["latest-news"], dict(ctx, news_items=short), "templates/latest-news.html") if short else "" + if p["id"] == "home": + ctx["services_list"] = "\n".join( + f'
  • {svc[i]["label"]}: {esc(data["services"][i])}
  • ' for i in site["home_order"]) + elif p["id"] == "services": + ctx["service_sections"] = "".join( + render(tpl["parts/service-section"], dict(ctx, id=s["id"], name=esc(data["items"][s["id"]]["name"]), + text=esc(data["items"][s["id"]]["text"]), url=s["url"]), + "templates/parts/service-section.html") for s in site["services"]) + elif p["id"] == "people": + cards = [] + for person in site["people"]: + handle, nm = person["handle"], person.get("name", "") + links = "\n".join(f'
  • {esc(x["label"])}
  • ' for x in person["links"]) + cards.append(render(tpl["parts/person-card"], dict( + ctx, handle=esc(handle), title=(esc(nm) + " (" + esc(handle) + ")") if nm else esc(handle), + bio=esc(data["bios"][handle]), links=links), "templates/parts/person-card.html")) + ctx["people_cards"] = "".join(cards) + elif p["id"] == "manifesto": + ctx.update(manifesto[lang]) + ctx["note_block"] = f'

    \n{esc(data["note"])}\n

    \n\n' if data.get("note") else "" + content = render(body_tpl.strip("\n") + "\n", ctx, f"templates/pages/{p['id']}.html") + lead = p["lead"] + ctx["content"] = content + ctx["lead"] = render(tpl["lead-" + lead], ctx, f"templates/lead-{lead}.html") + ctx["feed"] = render(tpl["feed"], ctx, "templates/feed.html") + ctx["badges"] = render(tpl["badges"], dict(ctx, doc_q=ctx["doc_url"].replace(":", "%3A").replace("/", "%2F")), "templates/badges.html") + ctx["header"] = render(tpl[L.get("header", "header")], ctx, "templates/header.html") + ctx["footer"] = render(tpl["footer"], ctx, "templates/footer.html") + rel = p["path"].lstrip("/") + write(rel + "index.html" if rel == "" or rel.endswith("/") else rel, render(tpl["base"], ctx, "templates/base.html")) - full, items, latest, mark = news[lang] - if "{{news_list}}" in p["body"]: - ctx["news_list"] = full - if "{{latest_news}}" in p["body"]: - ctx["latest_news"] = render(tpl["latest-news"], dict(ctx, news_items="\n".join( - f'
  • {html.escape(x["title"], quote=False)}
  • ' - for x in latest)), "templates/latest-news.html") if latest else "" - - if p["kind"] == "post": - _, _, post_html = md_to_html(p["body"]) - ctx["post_body"] = post_html - ctx["content"] = render(tpl["news-post"], ctx, "templates/news-post.html") - lead = "news" - else: - ctx["content"] = render(p["body"].strip("\n") + "\n", ctx, name) - lead = p.get("lead", "back") - ctx["lead"] = render(tpl["lead-" + lead], ctx, f"templates/lead-{lead}.html") - ctx["feed"] = render(tpl["feed"], ctx, "templates/feed.html") - ctx["badges"] = render(tpl["badges"], dict(ctx, doc_q=ctx["doc_url"].replace(":", "%3A").replace("/", "%2F")), - "templates/badges.html") - ctx["header"] = render(tpl[st.get("header", "header")], ctx, "templates/header.html") - ctx["footer"] = render(tpl["footer"], ctx, "templates/footer.html") - rel = p["path"].lstrip("/") - write(rel + "index.html" if rel == "" or rel.endswith("/") else rel, render(tpl["base"], ctx, "templates/base.html")) - - write("news/feed.xml", rss("en", strings["en"], site, posts_en)) + write(site["news_url"].lstrip("/") + "feed.xml", rss(langs["en"], site, posts)) for dest, src in ASSETS.items(): target = os.path.join(OUT, dest) os.makedirs(os.path.dirname(target), exist_ok=True) shutil.copy(os.path.join(HERE, src), target) write("robots.txt", "User-agent: *\nDisallow: /\n") - count = sum(len(v) for v in pages.values()) - print(f"built {count} pages into {OUT}") + print(f"built {len(pages)} pages into {OUT}") build() diff --git a/content/de/lang.toml b/content/de/lang.toml deleted file mode 100644 index a71dc95..0000000 --- a/content/de/lang.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Chrome strings, de. Manifesto only: this language has no other pages, so it uses the short header. -lang = "de" -lang_name = "Deutsch" -header = "header-min" -home_link = "/?lang=en" -url_manifesto = "/de/manifesto.html" -url_news = "/news/" -nav_news = "News" -nav_manifesto = "Manifest" -sections = "Bereiche" -nojs = "Diese Seite verwendet kein JavaScript, keine Cookies und keine Tracker." -back = "kmalloc.org" -version = "Version" -toc = "Inhalt" -translation_note = "Übersetzung der Version 1.0 nach den englischen und italienischen Texten." diff --git a/content/de/manifesto.html b/content/de/manifesto.html deleted file mode 100644 index 9b0b9d5..0000000 --- a/content/de/manifesto.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: manifesto -path: /de/manifesto.html -nav: manifesto -title: kmalloc.org: Manifest -description: Das Manifest von kmalloc.org: freie Software, Privatsphäre, ein offenes Internet, Würde bei der Arbeit. ---- -

    {{manifesto_title}}

    - -

    -{{version}} {{manifesto_version}} -

    - -

    -{{translation_note}} -

    - -

    {{toc}}

    - -
      -{{manifesto_toc}} -
    - -{{manifesto_body}} \ No newline at end of file diff --git a/content/en/index.html b/content/en/index.html deleted file mode 100644 index 36466f4..0000000 --- a/content/en/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: home -path: / -nav: home -lead: home -title: kmalloc.org: Technology. Freedom. Dissent. -description: kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet. ---- -

    - -

    - -

    Technology.
    Freedom.
    Dissent.

    - -

    -kmalloc.org is a hacker, antifascist, ethical space. -

    - -

    -kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet, defending freedom of thought, the dignity of work and the right of people not to be controlled, exploited or subordinated to arbitrary powers. -

    - -

    -Allocate freedom. -

    - -

    Manifesto

    - -

    -What we believe, in twelve points and a few commitments: -read the manifesto (version {{manifesto_version}}). -

    - -

    People

    - -

    -Who is behind kmalloc.org: -meet the people. -

    - -

    Services

    - -

    -Run on our own server, with free software. Accounts are created by hand. -get an account. -

    - -
      -
    • git: code hosting (Forgejo)
    • -
    • social: Mastodon, accounts on approval
    • -
    • lists: mailing lists (Mailman 3)
    • -
    • chat: XMPP, web client
    • -
    • matrix: Matrix, Element web client
    • -
    • meet: video conferences (Jitsi Meet)
    • -
    • webmail: email on our own server
    • -
    - -{{latest_news}} diff --git a/content/en/lang.toml b/content/en/lang.toml deleted file mode 100644 index 73fb0d1..0000000 --- a/content/en/lang.toml +++ /dev/null @@ -1,20 +0,0 @@ -# Chrome strings, en. -lang = "en" -lang_name = "English" -home_link = "/?lang=en" -url_manifesto = "/manifesto.html" -url_people = "/people.html" -url_services = "/services.html" -url_news = "/news/" -nav_manifesto = "Manifesto" -nav_people = "People" -nav_services = "Services" -nav_news = "News" -sections = "Sections" -nojs = "This page uses no JavaScript, cookies or trackers." -back = "home" -version = "Version" -toc = "Contents" -news_p = "Updates from kmalloc.org." -news_all = "all news" -news_empty = "No news yet." diff --git a/content/en/manifesto.html b/content/en/manifesto.html deleted file mode 100644 index 67354bb..0000000 --- a/content/en/manifesto.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -id: manifesto -path: /manifesto.html -nav: manifesto -title: kmalloc.org: Manifesto -description: The kmalloc.org manifesto: free software, privacy, an open Internet, dignity at work. ---- -

    {{manifesto_title}}

    - -

    -{{version}} {{manifesto_version}} -

    - -

    {{toc}}

    - -
      -{{manifesto_toc}} -
    - -{{manifesto_body}} \ No newline at end of file diff --git a/content/en/news.html b/content/en/news.html deleted file mode 100644 index fa0bcf7..0000000 --- a/content/en/news.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -id: news -path: /news/ -nav: news -title: kmalloc.org: News -description: Updates from kmalloc.org. ---- -

    News

    - -

    -Updates from kmalloc.org. -

    - -{{news_list}} - -

    -RSS feed -

    diff --git a/content/en/news/.gitkeep b/content/en/news/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/content/en/people.html b/content/en/people.html deleted file mode 100644 index 5b8997a..0000000 --- a/content/en/people.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: people -path: /people.html -nav: people -title: kmalloc.org: People -description: The people behind kmalloc.org. ---- -

    People

    - -

    -Who is behind kmalloc.org. -

    - -

    squid

    - -

    -I'm squid. I run kmalloc.org, write code and maintain the services on this site. I have been into computers since I was ten, when I got an IBM PS/2 with a 486DX and played Gorilla, a QBasic game: ever since, I have been taking things apart to understand how they work. Outside of work: retro computing, science fiction and extreme metal. -

    - - diff --git a/content/en/services.html b/content/en/services.html deleted file mode 100644 index d76559c..0000000 --- a/content/en/services.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: services -path: /services.html -nav: services -title: kmalloc.org: Services -description: The services run by kmalloc.org: email, git, Mastodon, XMPP, Matrix, mailing lists and video conferences. Free, by request. ---- -

    Services

    - -

    -These services run on our own server, with free software, for people who want an alternative to the big platforms. -

    - -

    Get an account

    - -

    -The services are free of charge. To ask for an account, write to -{{contact_shown}} -(replace (at) with @), -telling us which services you want and the username you would like. -

    - -

    Email

    - -

    -An address @kmalloc.org on our own mail server, with webmail and support for any standard mail client. IMAP: mail.kmalloc.org, port 993 (TLS). SMTP submission: mail.kmalloc.org, port 465 (TLS). Outgoing mail is signed with DKIM and protected by SPF and DMARC. -open. -

    - -

    Mailing lists

    - -

    -Mailing lists with web archives (Mailman 3). Lists live under @lists.kmalloc.org. If you need one, ask. -open. -

    - -

    Git

    - -

    -Code hosting with Forgejo: repositories, issues and pull requests. Git over SSH uses port 2222. Reading public repositories needs no account. -open. -

    - -

    Mastodon

    - -

    -A Mastodon server. Your address is @name@social.kmalloc.org. You can ask for an account on the site itself: requests are approved by hand. -open. -

    - -

    XMPP chat

    - -

    -Instant messaging with XMPP: address name@kmalloc.org, group rooms on conference.kmalloc.org, file sharing, and audio and video calls through our own TURN server. Use the web client or any XMPP app (server kmalloc.org, port 5222). -open. -

    - -

    Matrix

    - -

    -A Matrix homeserver: address @name:kmalloc.org. Use the Element web client or any Matrix app with homeserver matrix.kmalloc.org. -open. -

    - -

    Video conferences

    - -

    -Video conferences with Jitsi Meet. Anyone with the link can join a room; creating a room needs an account. -open. -

    - - - -

    -Donations are welcome and help keep the server running. Bitcoin address: -{{btc}} -

    - -

    Good to know

    - -

    -Everything is run by one person on one server, with nightly encrypted backups and no guarantees of availability. Be respectful: the manifesto explains what we stand for. -

    diff --git a/content/es/lang.toml b/content/es/lang.toml deleted file mode 100644 index 38ce184..0000000 --- a/content/es/lang.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Chrome strings, es. Manifesto only: this language has no other pages, so it uses the short header. -lang = "es" -lang_name = "Español" -header = "header-min" -home_link = "/?lang=en" -url_manifesto = "/es/manifesto.html" -url_news = "/news/" -nav_news = "News" -nav_manifesto = "Manifiesto" -sections = "Secciones" -nojs = "Esta página no usa JavaScript, cookies ni rastreadores." -back = "kmalloc.org" -version = "Versión" -toc = "Índice" -translation_note = "Traducción de la versión 1.0 a partir de los textos en inglés y en italiano." diff --git a/content/es/manifesto.html b/content/es/manifesto.html deleted file mode 100644 index 15a7b05..0000000 --- a/content/es/manifesto.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: manifesto -path: /es/manifesto.html -nav: manifesto -title: kmalloc.org: Manifiesto -description: El manifiesto de kmalloc.org: software libre, privacidad, una Internet abierta, dignidad en el trabajo. ---- -

    {{manifesto_title}}

    - -

    -{{version}} {{manifesto_version}} -

    - -

    -{{translation_note}} -

    - -

    {{toc}}

    - -
      -{{manifesto_toc}} -
    - -{{manifesto_body}} \ No newline at end of file diff --git a/content/fr/lang.toml b/content/fr/lang.toml deleted file mode 100644 index 003a664..0000000 --- a/content/fr/lang.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Chrome strings, fr. Manifesto only: this language has no other pages, so it uses the short header. -lang = "fr" -lang_name = "Français" -header = "header-min" -home_link = "/?lang=en" -url_manifesto = "/fr/manifesto.html" -url_news = "/news/" -nav_news = "News" -nav_manifesto = "Manifeste" -sections = "Sections" -nojs = "Cette page n'utilise ni JavaScript, ni cookies, ni traceurs." -back = "kmalloc.org" -version = "Version" -toc = "Sommaire" -translation_note = "Traduction de la version 1.0 à partir des textes anglais et italien." diff --git a/content/fr/manifesto.html b/content/fr/manifesto.html deleted file mode 100644 index fadb079..0000000 --- a/content/fr/manifesto.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: manifesto -path: /fr/manifesto.html -nav: manifesto -title: kmalloc.org: Manifeste -description: Le manifeste de kmalloc.org: logiciel libre, vie privée, un Internet ouvert, dignité au travail. ---- -

    {{manifesto_title}}

    - -

    -{{version}} {{manifesto_version}} -

    - -

    -{{translation_note}} -

    - -

    {{toc}}

    - -
      -{{manifesto_toc}} -
    - -{{manifesto_body}} \ No newline at end of file diff --git a/content/it/index.html b/content/it/index.html deleted file mode 100644 index 991c262..0000000 --- a/content/it/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: home -path: /it/ -nav: home -lead: home -title: kmalloc.org: Technology. Freedom. Dissent. -description: kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto. -switch: /?lang=en ---- -

    - -

    - -

    Technology.
    Freedom.
    Dissent.

    - -

    -kmalloc.org è uno spazio hacker, antifascista, etico. -

    - -

    -kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto, difendendo la libertà di pensiero, la dignità del lavoro e il diritto delle persone a non essere controllate, sfruttate o subordinate a poteri arbitrari. -

    - -

    -Allocate freedom. -

    - -

    Manifesto

    - -

    -Quello in cui crediamo, in dodici punti e qualche impegno: -leggi il manifesto (versione {{manifesto_version}}). -

    - -

    Persone

    - -

    -Chi c'è dietro kmalloc.org: -conosci le persone. -

    - -

    Servizi

    - -

    -Girano sul nostro server, con software libero. Gli account si creano a mano. -richiedi un account. -

    - -
      -
    • git: repository di codice (Forgejo)
    • -
    • social: Mastodon, account su approvazione
    • -
    • lists: liste di posta (Mailman 3)
    • -
    • chat: XMPP, client web
    • -
    • matrix: Matrix, client web Element
    • -
    • meet: videoconferenze (Jitsi Meet)
    • -
    • webmail: posta sul nostro server
    • -
    - -{{latest_news}} diff --git a/content/it/lang.toml b/content/it/lang.toml deleted file mode 100644 index 2f5c841..0000000 --- a/content/it/lang.toml +++ /dev/null @@ -1,20 +0,0 @@ -# Chrome strings, it. -lang = "it" -lang_name = "Italiano" -home_link = "/it/" -url_manifesto = "/it/manifesto.html" -url_people = "/it/persone.html" -url_services = "/it/servizi.html" -url_news = "/news/" -nav_manifesto = "Manifesto" -nav_people = "Persone" -nav_services = "Servizi" -nav_news = "News" -sections = "Sezioni" -nojs = "Questa pagina non usa JavaScript, cookie né tracker." -back = "home" -version = "Versione" -toc = "Indice" -news_p = "Novità da kmalloc.org, scritte in inglese." -news_all = "tutte le news" -news_empty = "Ancora nessuna news." diff --git a/content/it/manifesto.html b/content/it/manifesto.html deleted file mode 100644 index c4f7aee..0000000 --- a/content/it/manifesto.html +++ /dev/null @@ -1,20 +0,0 @@ ---- -id: manifesto -path: /it/manifesto.html -nav: manifesto -title: kmalloc.org: Manifesto -description: Il manifesto di kmalloc.org: software libero, privacy, un Internet aperto, dignità nel lavoro. ---- -

    {{manifesto_title}}

    - -

    -{{version}} {{manifesto_version}} -

    - -

    {{toc}}

    - -
      -{{manifesto_toc}} -
    - -{{manifesto_body}} \ No newline at end of file diff --git a/content/it/persone.html b/content/it/persone.html deleted file mode 100644 index ed185e1..0000000 --- a/content/it/persone.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: people -path: /it/persone.html -nav: people -title: kmalloc.org: Persone -description: Le persone dietro kmalloc.org. ---- -

    Persone

    - -

    -Chi c'è dietro kmalloc.org. -

    - -

    squid

    - -

    -Sono squid. Gestisco kmalloc.org, scrivo codice e mantengo i servizi di questo sito. Mi appassionano i computer da quando, a dieci anni, ebbi un IBM PS/2 con un 486DX e giocai a Gorilla, un gioco in QBasic: da allora smonto le cose per capire come funzionano. Fuori dal lavoro: retrocomputing, fantascienza ed extreme metal. -

    - - diff --git a/content/it/servizi.html b/content/it/servizi.html deleted file mode 100644 index 4caa239..0000000 --- a/content/it/servizi.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: services -path: /it/servizi.html -nav: services -title: kmalloc.org: Servizi -description: I servizi di kmalloc.org: posta, git, Mastodon, XMPP, Matrix, liste di posta e videoconferenze. Gratuiti, su richiesta. ---- -

    Servizi

    - -

    -Questi servizi girano sul nostro server, con software libero, per chi vuole un'alternativa alle grandi piattaforme. -

    - -

    Richiedi un account

    - -

    -I servizi sono gratuiti. Per chiedere un account scrivi a -{{contact_shown}} -(sostituisci (at) con @), -indicando quali servizi vuoi e il nome utente che preferisci. -

    - -

    Email

    - -

    -Un indirizzo @kmalloc.org sul nostro server di posta, con webmail e supporto per qualsiasi client di posta standard. IMAP: mail.kmalloc.org, porta 993 (TLS). Invio SMTP: mail.kmalloc.org, porta 465 (TLS). La posta in uscita è firmata con DKIM e protetta da SPF e DMARC. -apri. -

    - -

    Mailing lists

    - -

    -Liste di posta con archivi consultabili sul web (Mailman 3). Le liste stanno sotto @lists.kmalloc.org. Se te ne serve una, chiedila. -apri. -

    - -

    Git

    - -

    -Hosting di codice con Forgejo: repository, issue e pull request. Git via SSH usa la porta 2222. Per leggere i repository pubblici non serve un account. -apri. -

    - -

    Mastodon

    - -

    -Un server Mastodon. Il tuo indirizzo è @nome@social.kmalloc.org. L'account si può chiedere direttamente sul sito: le richieste si approvano a mano. -apri. -

    - -

    XMPP chat

    - -

    -Messaggistica con XMPP: indirizzo nome@kmalloc.org, stanze di gruppo su conference.kmalloc.org, condivisione di file e chiamate audio e video con un nostro server TURN. Usa il client web o qualsiasi app XMPP (server kmalloc.org, porta 5222). -apri. -

    - -

    Matrix

    - -

    -Un homeserver Matrix: indirizzo @nome:kmalloc.org. Usa il client web Element o qualsiasi app Matrix con homeserver matrix.kmalloc.org. -apri. -

    - -

    Video conferences

    - -

    -Videoconferenze con Jitsi Meet. Chiunque abbia il link può entrare in una stanza; per crearne una serve un account. -apri. -

    - - - -

    -Le donazioni sono benvenute e aiutano a tenere acceso il server. Indirizzo Bitcoin: -{{btc}} -

    - -

    Da sapere

    - -

    -Tutto è gestito da una persona su un solo server, con backup notturni cifrati e nessuna garanzia di disponibilità. Siate rispettosi: il manifesto spiega in cosa crediamo. -

    diff --git a/content/site.toml b/content/site.toml deleted file mode 100644 index 62b3bf6..0000000 --- a/content/site.toml +++ /dev/null @@ -1,5 +0,0 @@ -# Values shared by every page. -base_url = "https://kmalloc.org" -manifesto_version = "1.0" -contact = "squid@kmalloc.org" -btc = "bc1qsj5qadrzlqmfwcru4fwuqvftg833te5f9mja2c" diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..ce4649f --- /dev/null +++ b/lang/de.json @@ -0,0 +1,23 @@ +{ + "lang": "de", + "lang_name": "Deutsch", + "header": "header-min", + "home_link": "/?lang=en", + "sections": "Bereiche", + "nojs": "Diese Seite verwendet kein JavaScript, keine Cookies und keine Tracker.", + "back": "kmalloc.org", + "version": "Version", + "toc": "Inhalt", + "nav": { + "manifesto": "Manifest", + "news": "News" + }, + "pages": { + "manifesto": { + "path": "/de/manifesto.html", + "title": "kmalloc.org: Manifest", + "description": "Das Manifest von kmalloc.org: freie Software, Privatsphäre, ein offenes Internet, Würde bei der Arbeit.", + "note": "Übersetzung der Version 1.0 nach den englischen und italienischen Texten." + } + } +} diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..6087da7 --- /dev/null +++ b/lang/en.json @@ -0,0 +1,110 @@ +{ + "lang": "en", + "lang_name": "English", + "header": "header", + "home_link": "/?lang=en", + "sections": "Sections", + "nojs": "This page uses no JavaScript, cookies or trackers.", + "back": "home", + "version": "Version", + "toc": "Contents", + "news_p": "Updates from kmalloc.org.", + "news_all": "all news", + "news_empty": "No news yet.", + "nav": { + "manifesto": "Manifesto", + "people": "People", + "services": "Services", + "news": "News" + }, + "pages": { + "home": { + "path": "/", + "title": "kmalloc.org: Technology. Freedom. Dissent.", + "description": "kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet.", + "identity": "kmalloc.org is a hacker, antifascist, ethical space.", + "intro": "kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet, defending freedom of thought, the dignity of work and the right of people not to be controlled, exploited or subordinated to arbitrary powers.", + "manifesto_p": "What we believe, in twelve points and a few commitments:", + "manifesto_a": "read the manifesto", + "people_p": "Who is behind kmalloc.org:", + "people_a": "meet the people", + "services_p": "Run on our own server, with free software. Accounts are created by hand.", + "services_a": "get an account", + "services": { + "git": "code hosting (Forgejo)", + "social": "Mastodon, accounts on approval", + "lists": "mailing lists (Mailman 3)", + "chat": "XMPP, web client", + "matrix": "Matrix, Element web client", + "meet": "video conferences (Jitsi Meet)", + "mail": "email on our own server" + } + }, + "manifesto": { + "path": "/manifesto.html", + "title": "kmalloc.org: Manifesto", + "description": "The kmalloc.org manifesto: free software, privacy, an open Internet, dignity at work." + }, + "people": { + "path": "/people.html", + "title": "kmalloc.org: People", + "description": "The people behind kmalloc.org.", + "intro": "Who is behind kmalloc.org.", + "bios": { + "squid": "I'm squid. I run kmalloc.org, write code and maintain the services on this site. I have been into computers since I was ten, when I got an IBM PS/2 with a 486DX and played Gorilla, a QBasic game: ever since, I have been taking things apart to understand how they work. Outside of work: retro computing, science fiction and extreme metal." + } + }, + "services": { + "path": "/services.html", + "title": "kmalloc.org: Services", + "description": "The services run by kmalloc.org: email, git, Mastodon, XMPP, Matrix, mailing lists and video conferences. Free, by request.", + "intro": "These services run on our own server, with free software, for people who want an alternative to the big platforms.", + "account_h": "Get an account", + "account_p1": "The services are free of charge. To ask for an account, write to", + "at_hint": "replace (at) with @", + "account_p2": "telling us which services you want and the username you would like.", + "donate_h": "Support kmalloc.org", + "donate_p": "Donations are welcome and help keep the server running. Bitcoin address:", + "terms_h": "Good to know", + "terms_p": "Everything is run by one person on one server, with nightly encrypted backups and no guarantees of availability. Be respectful: the manifesto explains what we stand for.", + "open_a": "open", + "items": { + "mail": { + "name": "Email", + "text": "An address @kmalloc.org on our own mail server, with webmail and support for any standard mail client. IMAP: mail.kmalloc.org, port 993 (TLS). SMTP submission: mail.kmalloc.org, port 465 (TLS). Outgoing mail is signed with DKIM and protected by SPF and DMARC." + }, + "lists": { + "name": "Mailing lists", + "text": "Mailing lists with web archives (Mailman 3). Lists live under @lists.kmalloc.org. If you need one, ask." + }, + "git": { + "name": "Git", + "text": "Code hosting with Forgejo: repositories, issues and pull requests. Git over SSH uses port 2222. Reading public repositories needs no account." + }, + "social": { + "name": "Mastodon", + "text": "A Mastodon server. Your address is @name@social.kmalloc.org. You can ask for an account on the site itself: requests are approved by hand." + }, + "chat": { + "name": "XMPP chat", + "text": "Instant messaging with XMPP: address name@kmalloc.org, group rooms on conference.kmalloc.org, file sharing, and audio and video calls through our own TURN server. Use the web client or any XMPP app (server kmalloc.org, port 5222)." + }, + "matrix": { + "name": "Matrix", + "text": "A Matrix homeserver: address @name:kmalloc.org. Use the Element web client or any Matrix app with homeserver matrix.kmalloc.org." + }, + "meet": { + "name": "Video conferences", + "text": "Video conferences with Jitsi Meet. Anyone with the link can join a room; creating a room needs an account." + } + } + }, + "news": { + "path": "/news/", + "title": "kmalloc.org: News", + "description": "Updates from kmalloc.org.", + "intro": "Updates from kmalloc.org.", + "rss": "RSS feed" + } + } +} diff --git a/lang/es.json b/lang/es.json new file mode 100644 index 0000000..f7404e8 --- /dev/null +++ b/lang/es.json @@ -0,0 +1,23 @@ +{ + "lang": "es", + "lang_name": "Español", + "header": "header-min", + "home_link": "/?lang=en", + "sections": "Secciones", + "nojs": "Esta página no usa JavaScript, cookies ni rastreadores.", + "back": "kmalloc.org", + "version": "Versión", + "toc": "Índice", + "nav": { + "manifesto": "Manifiesto", + "news": "News" + }, + "pages": { + "manifesto": { + "path": "/es/manifesto.html", + "title": "kmalloc.org: Manifiesto", + "description": "El manifiesto de kmalloc.org: software libre, privacidad, una Internet abierta, dignidad en el trabajo.", + "note": "Traducción de la versión 1.0 a partir de los textos en inglés y en italiano." + } + } +} diff --git a/lang/fr.json b/lang/fr.json new file mode 100644 index 0000000..2cc408b --- /dev/null +++ b/lang/fr.json @@ -0,0 +1,23 @@ +{ + "lang": "fr", + "lang_name": "Français", + "header": "header-min", + "home_link": "/?lang=en", + "sections": "Sections", + "nojs": "Cette page n'utilise ni JavaScript, ni cookies, ni traceurs.", + "back": "kmalloc.org", + "version": "Version", + "toc": "Sommaire", + "nav": { + "manifesto": "Manifeste", + "news": "News" + }, + "pages": { + "manifesto": { + "path": "/fr/manifesto.html", + "title": "kmalloc.org: Manifeste", + "description": "Le manifeste de kmalloc.org: logiciel libre, vie privée, un Internet ouvert, dignité au travail.", + "note": "Traduction de la version 1.0 à partir des textes anglais et italien." + } + } +} diff --git a/lang/it.json b/lang/it.json new file mode 100644 index 0000000..1fa673e --- /dev/null +++ b/lang/it.json @@ -0,0 +1,106 @@ +{ + "lang": "it", + "lang_name": "Italiano", + "header": "header", + "home_link": "/it/", + "sections": "Sezioni", + "nojs": "Questa pagina non usa JavaScript, cookie né tracker.", + "back": "home", + "version": "Versione", + "toc": "Indice", + "news_p": "Novità da kmalloc.org, scritte in inglese.", + "news_all": "tutte le news", + "news_empty": "Ancora nessuna news.", + "nav": { + "manifesto": "Manifesto", + "people": "Persone", + "services": "Servizi", + "news": "News" + }, + "pages": { + "home": { + "path": "/it/", + "title": "kmalloc.org: Technology. Freedom. Dissent.", + "description": "kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto.", + "identity": "kmalloc.org è uno spazio hacker, antifascista, etico.", + "intro": "kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto, difendendo la libertà di pensiero, la dignità del lavoro e il diritto delle persone a non essere controllate, sfruttate o subordinate a poteri arbitrari.", + "manifesto_p": "Quello in cui crediamo, in dodici punti e qualche impegno:", + "manifesto_a": "leggi il manifesto", + "people_p": "Chi c'è dietro kmalloc.org:", + "people_a": "conosci le persone", + "services_p": "Girano sul nostro server, con software libero. Gli account si creano a mano.", + "services_a": "richiedi un account", + "services": { + "git": "repository di codice (Forgejo)", + "social": "Mastodon, account su approvazione", + "lists": "liste di posta (Mailman 3)", + "chat": "XMPP, client web", + "matrix": "Matrix, client web Element", + "meet": "videoconferenze (Jitsi Meet)", + "mail": "posta sul nostro server" + }, + "switch": { + "en": "/?lang=en" + } + }, + "manifesto": { + "path": "/it/manifesto.html", + "title": "kmalloc.org: Manifesto", + "description": "Il manifesto di kmalloc.org: software libero, privacy, un Internet aperto, dignità nel lavoro." + }, + "people": { + "path": "/it/persone.html", + "title": "kmalloc.org: Persone", + "description": "Le persone dietro kmalloc.org.", + "intro": "Chi c'è dietro kmalloc.org.", + "bios": { + "squid": "Sono squid. Gestisco kmalloc.org, scrivo codice e mantengo i servizi di questo sito. Mi appassionano i computer da quando, a dieci anni, ebbi un IBM PS/2 con un 486DX e giocai a Gorilla, un gioco in QBasic: da allora smonto le cose per capire come funzionano. Fuori dal lavoro: retrocomputing, fantascienza ed extreme metal." + } + }, + "services": { + "path": "/it/servizi.html", + "title": "kmalloc.org: Servizi", + "description": "I servizi di kmalloc.org: posta, git, Mastodon, XMPP, Matrix, liste di posta e videoconferenze. Gratuiti, su richiesta.", + "intro": "Questi servizi girano sul nostro server, con software libero, per chi vuole un'alternativa alle grandi piattaforme.", + "account_h": "Richiedi un account", + "account_p1": "I servizi sono gratuiti. Per chiedere un account scrivi a", + "at_hint": "sostituisci (at) con @", + "account_p2": "indicando quali servizi vuoi e il nome utente che preferisci.", + "donate_h": "Sostieni kmalloc.org", + "donate_p": "Le donazioni sono benvenute e aiutano a tenere acceso il server. Indirizzo Bitcoin:", + "terms_h": "Da sapere", + "terms_p": "Tutto è gestito da una persona su un solo server, con backup notturni cifrati e nessuna garanzia di disponibilità. Siate rispettosi: il manifesto spiega in cosa crediamo.", + "open_a": "apri", + "items": { + "mail": { + "name": "Email", + "text": "Un indirizzo @kmalloc.org sul nostro server di posta, con webmail e supporto per qualsiasi client di posta standard. IMAP: mail.kmalloc.org, porta 993 (TLS). Invio SMTP: mail.kmalloc.org, porta 465 (TLS). La posta in uscita è firmata con DKIM e protetta da SPF e DMARC." + }, + "lists": { + "name": "Mailing lists", + "text": "Liste di posta con archivi consultabili sul web (Mailman 3). Le liste stanno sotto @lists.kmalloc.org. Se te ne serve una, chiedila." + }, + "git": { + "name": "Git", + "text": "Hosting di codice con Forgejo: repository, issue e pull request. Git via SSH usa la porta 2222. Per leggere i repository pubblici non serve un account." + }, + "social": { + "name": "Mastodon", + "text": "Un server Mastodon. Il tuo indirizzo è @nome@social.kmalloc.org. L'account si può chiedere direttamente sul sito: le richieste si approvano a mano." + }, + "chat": { + "name": "XMPP chat", + "text": "Messaggistica con XMPP: indirizzo nome@kmalloc.org, stanze di gruppo su conference.kmalloc.org, condivisione di file e chiamate audio e video con un nostro server TURN. Usa il client web o qualsiasi app XMPP (server kmalloc.org, porta 5222)." + }, + "matrix": { + "name": "Matrix", + "text": "Un homeserver Matrix: indirizzo @nome:kmalloc.org. Usa il client web Element o qualsiasi app Matrix con homeserver matrix.kmalloc.org." + }, + "meet": { + "name": "Video conferences", + "text": "Videoconferenze con Jitsi Meet. Chiunque abbia il link può entrare in una stanza; per crearne una serve un account." + } + } + } + } +} diff --git a/content/en/news/2026-11-12-status-page.md b/news/2026-11-12-status-page.md similarity index 100% rename from content/en/news/2026-11-12-status-page.md rename to news/2026-11-12-status-page.md diff --git a/site.json b/site.json new file mode 100644 index 0000000..952ca76 --- /dev/null +++ b/site.json @@ -0,0 +1,76 @@ +{ + "base_url": "https://kmalloc.org", + "languages": [ + "en", + "it", + "es", + "de", + "fr" + ], + "manifesto_version": "1.0", + "contact": "squid@kmalloc.org", + "btc": "bc1qsj5qadrzlqmfwcru4fwuqvftg833te5f9mja2c", + "home_order": [ + "git", + "social", + "lists", + "chat", + "matrix", + "meet", + "mail" + ], + "services": [ + { + "id": "mail", + "url": "https://webmail.kmalloc.org/", + "label": "webmail" + }, + { + "id": "lists", + "url": "https://lists.kmalloc.org/", + "label": "lists" + }, + { + "id": "git", + "url": "https://git.kmalloc.org/", + "label": "git" + }, + { + "id": "social", + "url": "https://social.kmalloc.org/", + "label": "social", + "home_url": "https://social.kmalloc.org/@squid" + }, + { + "id": "chat", + "url": "https://chat.kmalloc.org/", + "label": "chat" + }, + { + "id": "matrix", + "url": "https://element.kmalloc.org/", + "label": "matrix" + }, + { + "id": "meet", + "url": "https://meet.kmalloc.org/", + "label": "meet" + } + ], + "people": [ + { + "handle": "squid", + "name": "", + "links": [ + { + "label": "Mastodon", + "url": "https://social.kmalloc.org/@squid" + }, + { + "label": "git", + "url": "https://git.kmalloc.org/squid" + } + ] + } + ] +} diff --git a/templates/pages/home.html b/templates/pages/home.html new file mode 100644 index 0000000..3efb58a --- /dev/null +++ b/templates/pages/home.html @@ -0,0 +1,44 @@ +

    + +

    + +

    Technology.
    Freedom.
    Dissent.

    + +

    +{{identity}} +

    + +

    +{{intro}} +

    + +

    +Allocate freedom. +

    + +

    {{nav_manifesto}}

    + +

    +{{manifesto_p}} +{{manifesto_a}} ({{version_lc}} {{manifesto_version}}). +

    + +

    {{nav_people}}

    + +

    +{{people_p}} +{{people_a}}. +

    + +

    {{nav_services}}

    + +

    +{{services_p}} +{{services_a}}. +

    + +
      +{{services_list}} +
    + +{{latest_news}} diff --git a/templates/pages/manifesto.html b/templates/pages/manifesto.html new file mode 100644 index 0000000..2b8a1ce --- /dev/null +++ b/templates/pages/manifesto.html @@ -0,0 +1,13 @@ +

    {{manifesto_title}}

    + +

    +{{version}} {{manifesto_version}} +

    + +{{note_block}}

    {{toc}}

    + +
      +{{manifesto_toc}} +
    + +{{manifesto_body}} diff --git a/templates/pages/news.html b/templates/pages/news.html new file mode 100644 index 0000000..f9d3a50 --- /dev/null +++ b/templates/pages/news.html @@ -0,0 +1,11 @@ +

    {{nav_news}}

    + +

    +{{intro}} +

    + +{{news_list}} + +

    +{{rss}} +

    diff --git a/templates/pages/people.html b/templates/pages/people.html new file mode 100644 index 0000000..a7f5e8a --- /dev/null +++ b/templates/pages/people.html @@ -0,0 +1,7 @@ +

    {{nav_people}}

    + +

    +{{intro}} +

    + +{{people_cards}} diff --git a/templates/pages/services.html b/templates/pages/services.html new file mode 100644 index 0000000..8de694e --- /dev/null +++ b/templates/pages/services.html @@ -0,0 +1,27 @@ +

    {{nav_services}}

    + +

    +{{intro}} +

    + +

    {{account_h}}

    + +

    +{{account_p1}} +{{contact_shown}} +({{at_hint}}), +{{account_p2}} +

    + +{{service_sections}} + +

    +{{donate_p}} +{{btc}} +

    + +

    {{terms_h}}

    + +

    +{{terms_p}} +

    diff --git a/templates/parts/person-card.html b/templates/parts/person-card.html new file mode 100644 index 0000000..3b4a94f --- /dev/null +++ b/templates/parts/person-card.html @@ -0,0 +1,9 @@ +

    {{title}}

    + +

    +{{bio}} +

    + +
      +{{links}} +
    diff --git a/templates/parts/service-section.html b/templates/parts/service-section.html new file mode 100644 index 0000000..445605b --- /dev/null +++ b/templates/parts/service-section.html @@ -0,0 +1,7 @@ +

    {{name}}

    + +

    +{{text}} +{{open_a}}. +

    +