Swap shiki for highlight.js's core build for syntax highlighting

Shiki pulls in a WASM oniguruma engine and bundled theme/grammar JSON
for two full themes; highlight.js's core build plus only the 11
languages content actually uses is much thinner for the same job here.
Token colors now come straight from the design tokens (--accent,
--text-muted, ...) instead of shiki's dual-theme CSS vars, so they
already switch with the site's theme with no extra [data-theme] rules.
This commit is contained in:
2026-09-01 09:20:12 +03:00
parent 74a7f80b29
commit 27e53993d6
5 changed files with 110 additions and 60 deletions
+9 -3
View File
@@ -99,15 +99,15 @@ importers:
astro:
specifier: ^7.2.9
version: 7.2.9(@emnapi/[email protected])(@emnapi/[email protected])(@types/[email protected])([email protected])([email protected])
highlight.js:
specifier: ^11.12.0
version: 11.12.0
marked:
specifier: ^18.0.11
version: 18.0.11
pagefind:
specifier: ^1.5.2
version: 1.5.2
shiki:
specifier: ^4.4.3
version: 4.4.3
smol-toml:
specifier: ^1.8.0
version: 1.8.0
@@ -4779,6 +4779,10 @@ packages:
[email protected]:
resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
[email protected]:
resolution: {integrity: sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==}
engines: {node: '>=12.0.0'}
[email protected]:
resolution: {integrity: sha512-uu0VXUK52JhihhnN/MVVo1lvqNNuhoxkonqgO3IpjvQiGpJBdIXMGkofjQb/j9zvV7a1SW8U9g1FslWx/1HOiQ==}
@@ -13590,6 +13594,8 @@ snapshots:
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: