Jacky Zhao
2023-08-12 e1dd6aee863878a02f51200b3878d619220c22f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { QuartzTransformerPlugin } from "../types"
import rehypePrettyCode, { Options as CodeOptions } from "rehype-pretty-code"
 
export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
  name: "SyntaxHighlighting",
  htmlPlugins() {
    return [
      [
        rehypePrettyCode,
        {
          theme: "css-variables",
        } satisfies Partial<CodeOptions>,
      ],
    ]
  },
})