From 74a7f80b29ac67849f8af413d496bd4d62261f62 Mon Sep 17 00:00:00 2001 From: andwati Date: Tue, 1 Sep 2026 09:14:29 +0300 Subject: [PATCH] Render legacy callout shortcodes, add code syntax highlighting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Converts the note/tip/warning/danger `{% %}...{% %}` blocks the posts→writings migration script left untranslated into styled .callout markup (toml-content-loader.ts's renderCallouts(), styled in global.css to match the new design system). Also wires shiki into the same markdown pipeline for fenced code block highlighting (github-light/github-dark, switched by the same [data-theme]/prefers-color-scheme pattern tokens.css already uses). Also records the Three.js centerpiece's perf budget check in TODO.md: scene is trivially light (well under 10k triangles, 100+fps uncapped); the ~130KB gzip payload is three.js core itself, not a tree-shaking gap (verified named imports change nothing - sideEffects:false already lets Rollup shake fully), and the script is a deferred module that doesn't block first paint. No code changes needed there. --- TODO.md | 26 +++++- apps/site/package.json | 1 + apps/site/src/lib/toml-content-loader.ts | 100 ++++++++++++++++++++++- apps/site/src/styles/global.css | 77 +++++++++++++++++ pnpm-lock.yaml | 3 + 5 files changed, 202 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 55c9533..b28a089 100644 --- a/TODO.md +++ b/TODO.md @@ -90,7 +90,15 @@ approved plan for full rationale on each decision referenced below. - [x] Fallback for `prefers-reduced-motion` (skips rotation/entrance animation) and no-WebGL (`supportsWebGL()` check hides the canvas entirely, falls back to a `