From: Dan Callaghan <dan@bl2.djc.id.au>
To: sup-commits@supmua.dev
Subject: [sup-website.git] branch master updated: add the favicon to stagit output as well
Date: Sun, 29 Nov 2026 15:52:45 +1100 [thread overview]
Message-ID: <179592796518.310993.11381862325220803876@bl2.djc.id.au> (raw)
Pushed a commit to branch master:
https://supmua.dev/git/sup-website/commit/1861a0817231bc3a3c54aad8f500ed9b6b6cb7e8.html
The following commit(s) were added to refs/heads/master by this push:
new 1861a08 add the favicon to stagit output as well
1861a08 is described below
commit 1861a0817231bc3a3c54aad8f500ed9b6b6cb7e8
Author: Dan Callaghan <djc@djc.id.au>
AuthorDate: Sun Nov 29 15:52:26 2026 +1100
add the favicon to stagit output as well
I forgot that it doesn't use the shared Jekyll layout.
---
_plugins/stagit.rb | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/_plugins/stagit.rb b/_plugins/stagit.rb
index f508d90..5466b76 100644
--- a/_plugins/stagit.rb
+++ b/_plugins/stagit.rb
@@ -26,11 +26,23 @@ def wrap_stagit_output path, header
body.children.remove
body << header << nav_section << main_section
- ## Fix the stylesheet and add dummy favion like _layouts/default.md
+ ## Fix the stylesheet and add favicons like _layouts/default.md
stylesheet = doc.at_css('link[rel="stylesheet"]')
stylesheet["href"] = "/stylesheets/stylesheet.css"
stylesheet["media"] = "screen"
- doc.at("head").add_child '<link rel="icon" href="data:image/png;base64,iVBORw0KGgo=">'
+ [48, 32, 16].each do |size|
+ link = doc.create_element "link"
+ link["rel"] = "icon"
+ link["type"] = "image/png"
+ link["sizes"] = "#{size}x#{size}"
+ link["href"] = "/images/favicon-dark-#{size}.png"
+ link["media"] = "(prefers-color-scheme: dark)"
+ doc.at("head").add_child link
+ link = link.clone
+ link["href"] = "/images/favicon-#{size}.png"
+ link["media"] = "(prefers-color-scheme: light)"
+ doc.at("head").add_child link
+ end
## Add some nicer markup in commit messages
doc.xpath("//pre[b[normalize-space()='commit' and not(preceding-sibling::node())]]//text()").each do |text_node|
reply other threads:[~2026-11-29 4:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179592796518.310993.11381862325220803876@bl2.djc.id.au \
--to=dan@bl2.djc.id.au \
--cc=djc@djc.id.au \
--cc=sup-commits@supmua.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox