2023-06-02 06:05:14 +07:00
|
|
|
import { QuartzTransformerPlugin } from "../types"
|
|
|
|
import rehypePrettyCode, { Options as CodeOptions } from "rehype-pretty-code"
|
|
|
|
|
2023-06-12 13:26:43 +07:00
|
|
|
export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
|
|
|
|
name: "SyntaxHighlighting",
|
|
|
|
htmlPlugins() {
|
2023-07-23 07:27:41 +07:00
|
|
|
return [
|
|
|
|
[
|
|
|
|
rehypePrettyCode,
|
|
|
|
{
|
|
|
|
theme: "css-variables",
|
|
|
|
} satisfies Partial<CodeOptions>,
|
|
|
|
],
|
|
|
|
]
|
|
|
|
},
|
2023-06-12 13:26:43 +07:00
|
|
|
})
|