From bcdfe98c923398087b1ccf699c046936df818478 Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Fri, 2 Jan 2026 00:11:12 +0100 Subject: [PATCH] fix: inline svg icons to follow foreground color --- _config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_config.ts b/_config.ts index d26acbf..e86f0c6 100644 --- a/_config.ts +++ b/_config.ts @@ -29,7 +29,11 @@ site.use(djotPlugin({ symb: (symbol: djot.Symb, renderer: djot.HTMLRenderer) => { if (symbol.alias.startsWith("si-")) { const iconName = symbol.alias.substring(3); - return ``; + const decoder = new TextDecoder("utf-8"); + const svg = decoder.decode( + Deno.readFileSync(`./icons/${iconName}.svg`), + ); + return svg; } return renderer.renderAstNodeDefault(symbol); },