feat: introduce Expressive Code for code block rendering (#476)

* feat: improve code block feature with Expressive Code

* docs: add example Markdown file for visual review

* feat: improve styles of Expressive Code

* fix: errors from the merging

* chore: formatting

* chore: update config

* chore: update dependencies

* fix: fix build error

* fix: minor fixes

* fix: style tweaks

* docs: update example post

* fix: isolate copy button timeouts to avoid cross-button interference

---------

Co-authored-by: Hasenpfote <Hasenpfote36@gmail.com>
This commit is contained in:
Saica
2025-06-03 22:41:36 +08:00
committed by GitHub
parent e640964e5e
commit ee48c2f09d
15 changed files with 1384 additions and 648 deletions

View File

@@ -21,6 +21,9 @@
"@astrojs/sitemap": "^3.4.0",
"@astrojs/svelte": "7.1.0",
"@astrojs/tailwind": "^6.0.2",
"@expressive-code/core": "^0.41.2",
"@expressive-code/plugin-collapsible-sections": "^0.41.2",
"@expressive-code/plugin-line-numbers": "^0.41.2",
"@fontsource-variable/jetbrains-mono": "^5.2.5",
"@fontsource/roboto": "^5.2.5",
"@iconify-json/fa6-brands": "^1.2.5",
@@ -31,6 +34,7 @@
"@swup/astro": "^1.6.0",
"@tailwindcss/typography": "^0.5.16",
"astro": "5.8.1",
"astro-expressive-code": "^0.41.2",
"astro-icon": "^1.1.5",
"hastscript": "^9.0.1",
"katex": "^0.16.22",
@@ -61,6 +65,7 @@
"@astrojs/ts-plugin": "^1.10.4",
"@biomejs/biome": "1.9.4",
"@rollup/plugin-yaml": "^4.1.2",
"@types/hast": "^3.0.4",
"@types/markdown-it": "^14.1.2",
"@types/mdast": "^4.0.4",
"@types/sanitize-html": "^2.16.0",