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