2023-06-01 19:05:14 -04:00
|
|
|
import { QuartzTransformerPlugin } from "../types"
|
|
|
|
import rehypePrettyCode, { Options as CodeOptions } from "rehype-pretty-code"
|
|
|
|
|
2023-06-11 23:26:43 -07:00
|
|
|
export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
|
|
|
|
name: "SyntaxHighlighting",
|
|
|
|
htmlPlugins() {
|
2023-07-22 17:27:41 -07:00
|
|
|
return [
|
|
|
|
[
|
|
|
|
rehypePrettyCode,
|
|
|
|
{
|
2024-01-05 17:29:34 +09:00
|
|
|
keepBackground: false,
|
|
|
|
theme: {
|
|
|
|
dark: "github-dark",
|
|
|
|
light: "github-light",
|
|
|
|
},
|
2023-07-22 17:27:41 -07:00
|
|
|
} satisfies Partial<CodeOptions>,
|
|
|
|
],
|
|
|
|
]
|
|
|
|
},
|
2023-06-11 23:26:43 -07:00
|
|
|
})
|