diff --git a/build.py b/build.py index 61b70d3..646c316 100644 --- a/build.py +++ b/build.py @@ -45,6 +45,7 @@ ASSETS = { "apple-touch-icon.png": "logo/web/apple-touch-icon.png", "badges/w3c-html5.png": "badges/w3c-html5.png", "badges/w3c-css.png": "badges/w3c-css.png", + "squid.asc": "static/squid.asc", } @@ -363,6 +364,9 @@ def build(): entries = ([("home", person["home"], data["personal_page"])] if person.get("home") else []) entries += [("link", x["url"], x["label"]) for x in person["links"]] links = "\n".join(f'
  • {esc(label)}
  • ' for _, u, label in entries) + if person.get("gpg"): + links += (f'\n
  • {esc(data["gpg_label"])}: {os.path.basename(site["gpg_key"])}, ' + f'{esc(data["gpg_word"])} {site["gpg_fingerprint"]}
  • ') 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")) diff --git a/lang/en.json b/lang/en.json index 4b40c22..37674e6 100644 --- a/lang/en.json +++ b/lang/en.json @@ -53,7 +53,9 @@ "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." }, - "personal_page": "Personal page" + "personal_page": "Personal page", + "gpg_label": "GPG key", + "gpg_word": "fingerprint" }, "services": { "path": "/services.html", @@ -98,7 +100,13 @@ "name": "Video conferences", "text": "Video conferences with Jitsi Meet. Anyone with the link can join a room; creating a room needs an account." } - } + }, + "contact_h": "Contact", + "contact_p1": "To contact me you need GPG: write to the address above with your message encrypted with my public key.", + "contact_fingerprint": "Fingerprint of my key:", + "contact_key": "download the key", + "contact_keyserver": "find it on keys.openpgp.org", + "account_gpg": "Messages must be encrypted with GPG, see" }, "news": { "path": "/news/", diff --git a/lang/it.json b/lang/it.json index 55d4215..c3b83d1 100644 --- a/lang/it.json +++ b/lang/it.json @@ -56,7 +56,9 @@ "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." }, - "personal_page": "Pagina personale" + "personal_page": "Pagina personale", + "gpg_label": "Chiave GPG", + "gpg_word": "impronta" }, "services": { "path": "/it/servizi.html", @@ -101,7 +103,13 @@ "name": "Video conferences", "text": "Videoconferenze con Jitsi Meet. Chiunque abbia il link può entrare in una stanza; per crearne una serve un account." } - } + }, + "contact_h": "Contatti", + "contact_p1": "Per contattarmi serve GPG: scrivi all'indirizzo qui sopra con il messaggio cifrato con la mia chiave pubblica.", + "contact_fingerprint": "Impronta della mia chiave:", + "contact_key": "scarica la chiave", + "contact_keyserver": "trovala su keys.openpgp.org", + "account_gpg": "I messaggi vanno cifrati con GPG, vedi" } } } diff --git a/site.json b/site.json index 8e8dfff..371e1fd 100644 --- a/site.json +++ b/site.json @@ -71,7 +71,11 @@ "url": "https://git.kmalloc.org/squid" } ], - "home": "/~squid/" + "home": "/~squid/", + "gpg": true } - ] + ], + "gpg_fingerprint": "85B3 8E4D D4B5 1FD9 FF0C 74CB 3430 97BB 6D41 B4DD", + "gpg_key": "/squid.asc", + "gpg_keyserver": "https://keys.openpgp.org/search?q=squid%40kmalloc.org" } diff --git a/static/squid.asc b/static/squid.asc new file mode 100644 index 0000000..cd56f49 --- /dev/null +++ b/static/squid.asc @@ -0,0 +1,13 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mDMEavbJyRYJKwYBBAHaRw8BAQdAquhrf52Oib0UYJ0H6lebcBJINWn2IK+csfeQ +E2cnRMi0GXNxdWlkIDxzcXVpZEBrbWFsbG9jLm9yZz6IlgQTFgoAPhYhBIWzjk3U +tR/Z/wx0yzQwl7ttQbTdBQJq9snJAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMB +Ah4BAheAAAoJEDQwl7ttQbTdKB0BALh+KGxt2SQfRWXZLpjD6fT9G0mdaBmIZY3C +CHzF+sx7AP9PDMZNG87DXXVudoaJVD1EHrdsCs/whMeYLhoY2C+HA7g4BGr2ydgS +CisGAQQBl1UBBQEBB0CHEgmNKO2MmtFfobooAC/662cnl8yu744I2MmVqF8kUQMB +CAeIfgQYFgoAJhYhBIWzjk3UtR/Z/wx0yzQwl7ttQbTdBQJq9snYAhsMBQkDwmcA +AAoJEDQwl7ttQbTdlV0A/A9wW2iFHIeINfHHiGkBg2Nn+VtToEb3+RKMGb4kIIIw +AQCLfZgzzEBi8KLD8hEFT/WmfyoXxaVj1V+gRylKrBQQCw== +=eGlO +-----END PGP PUBLIC KEY BLOCK----- diff --git a/templates/pages/services.html b/templates/pages/services.html index 8de694e..959d424 100644 --- a/templates/pages/services.html +++ b/templates/pages/services.html @@ -11,6 +11,22 @@ {{contact_shown}} ({{at_hint}}), {{account_p2}} +{{account_gpg}} {{contact_h}}. +

    + +

    {{contact_h}}

    + +

    +{{contact_p1}} +

    + +

    +{{contact_fingerprint}} {{gpg_fingerprint}} +

    + +

    +{{contact_key}}, +{{contact_keyserver}}.

    {{service_sections}}