From 3e69279f3d9a1145664dea8f2b3b01395be65e50 Mon Sep 17 00:00:00 2001 From: Ludo Date: Sat, 11 Apr 2026 18:58:30 +0200 Subject: [PATCH] fix: switch Hugo to CSS class-based syntax highlighting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set noClasses=false so Hugo outputs Chroma CSS classes instead of inline styles. 10-chroma.css now drives all syntax colors using ASW's --syntax-* tokens. Fixed remaining primitive leaks (--violet-4, --orange-3 → --syntax-keyword, --syntax-variable). Co-Authored-By: Claude Opus 4.6 (1M context) --- site/hugo.toml | 2 +- src/layers/10-chroma.css | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/site/hugo.toml b/site/hugo.toml index a39a9be..d0a2d11 100644 --- a/site/hugo.toml +++ b/site/hugo.toml @@ -30,7 +30,7 @@ title = 'ASW — Agentic Semantic Web' ordered = false [markup.highlight] - noClasses = true + noClasses = false codeFences = true guessSyntax = true diff --git a/src/layers/10-chroma.css b/src/layers/10-chroma.css index 8acad83..bb07813 100644 --- a/src/layers/10-chroma.css +++ b/src/layers/10-chroma.css @@ -33,12 +33,12 @@ .chroma .kp, .chroma .kr, .chroma .kt { - color: var(--violet-4); + color: var(--syntax-keyword); } -/* KeywordNamespace — import/from/as — pink accent to distinguish */ +/* KeywordNamespace — import/from/as */ .chroma .kn { - color: var(--violet-3); + color: var(--syntax-keyword); } /* ── Strings ─────────────────────────────────────────────────────────── */ @@ -75,7 +75,7 @@ .chroma .cp, .chroma .cpf, .chroma .cs { - color: var(--text-2); + color: var(--syntax-comment); font-style: italic; } @@ -90,7 +90,7 @@ .chroma .il, .chroma .mo, .chroma .mx { - color: var(--orange-3); + color: var(--syntax-variable); } /* ── Names / Functions ───────────────────────────────────────────────── */