Jacky Zhao
2024-01-29 85f05ea99b16e246b5b86e5408ff35ffa52783e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { QuartzTransformerPlugin } from "../types"
import rehypePrettyCode, { Options as CodeOptions } from "rehype-pretty-code"
 
export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
  name: "SyntaxHighlighting",
  htmlPlugins() {
    return [
      [
        rehypePrettyCode,
        {
          keepBackground: false,
          theme: {
            dark: "github-dark",
            light: "github-light",
          },
        } satisfies Partial<CodeOptions>,
      ],
    ]
  },
})