feat: 添加 rehype-code-group 插件,优化代码块显示与样式,新增友链夜白的小空间

This commit is contained in:
2026-10-16 22:13:46 +08:00
parent 6f8fff461b
commit 779a3ea27d
11 changed files with 364 additions and 1 deletions
+2
View File
@@ -19,6 +19,7 @@ import mdx from "@astrojs/mdx";
import { pluginCollapsible } from "expressive-code-collapsible"; /* Collapsible */
import { pluginLanguageBadge } from "expressive-code-language-badge"; /* Language Badge */
import rehypeCallouts from "rehype-callouts";
import rehypeCodeGroup from "rehype-code-group";
import rehypeSlug from "rehype-slug";
import remarkAdmonitionToBlockquoteCallout from "remark-admonition-to-blockquote-callout";
import remarkDirective from "remark-directive"; /* Handle directives */
@@ -243,6 +244,7 @@ export default defineConfig({
[remarkPlantuml, plantumlConfig],
],
rehypePlugins: [
[rehypeCodeGroup, { assets: "none" }],
[rehypeKatex, { katex }],
[rehypeCallouts, { theme: siteConfig.post.rehypeCallouts.theme }],
rehypeSlug,