松浦 知也 Matsuura Tomoya
2024-02-05 ba836dd3e0cda5df23f6d34539809d36805d230e
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>,
      ],
    ]
  },
})