From 75450307c0c5a0fdf9826e5b06bdf252cfe22df0 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 20:14:48 -1000 Subject: Trim the comments and dead code across the tree --- custom/extensions/email-gravatar.lua | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'custom/extensions/email-gravatar.lua') diff --git a/custom/extensions/email-gravatar.lua b/custom/extensions/email-gravatar.lua index 85947c4..6eb5376 100644 --- a/custom/extensions/email-gravatar.lua +++ b/custom/extensions/email-gravatar.lua @@ -27,29 +27,25 @@ -- luarocks install luaossl OPENSSL_DIR="$(brew --prefix openssl)" -- -- Every page view sends the visitor's IP address and a hash of each --- committer's email to a third-party service, so leave this filter off if that --- is not acceptable for your instance. Addresses are hashed with MD5, which --- Gravatar still accepts. Gravatar also supports SHA-256 now, so change the --- digest in hash_hex if you prefer it. +-- committer's email to a third-party service, so leave this filter off if +-- that is not acceptable for your instance. Addresses are hashed with MD5, +-- which Gravatar still accepts. local digest = require("openssl.digest") --- These are the values to change. The size is in pixels and serves both as the --- image asked of the service and as the width and height attributes. The --- default image is the style Gravatar draws for an address it has never seen, --- and its documented choices include retro, identicon, monsterid and mp. The --- endpoint is https so the icon is not blocked as mixed content on an https --- page. +-- The size is in pixels and serves both as the image asked of the service +-- and as the width and height attributes. The default image is what +-- Gravatar draws for an address it has never seen. The endpoint is https so +-- the icon is not blocked as mixed content on an https page. local avatar_size = 13 local default_image = "retro" local base_url = "https://www.gravatar.com/avatar/" local alt_text = "Gravatar" --- cgit calls filter_open once, then filter_write for each piece of the name, --- then filter_close, so what one call works out has to be left here for the --- next one. +-- One name reaches this filter as an open, writes and a close, so what the +-- open works out is kept here for the close. local buffer = "" local avatar_hash = nil -- cgit v2.8.0