Skip to content

Commit

Permalink
feat(rehype): add dark and light theme to rehype-pretty-code
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Dec 12, 2022
1 parent e51568f commit 03a2460
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/rehypePrettyCode.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { type Options } from 'rehype-pretty-code'

export const rehypePrettyCodeOptions: Partial<Options> = {
theme: 'github-light',
theme: {
dark: 'github-dark',
light: 'github-light'
},
onVisitLine(node) {
// Prevent lines from collapsing in `display: grid` mode, and
// allow empty lines to be copy/pasted
Expand Down

0 comments on commit 03a2460

Please sign in to comment.