Jacky Zhao
2023-08-08 527ce6546e7ec50e7720ff7b9b6ff79a89c3b7fc
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>,
      ],
    ]
  },
})