feat: automatically convert h1 to h2

This commit is contained in:
DIYgod 2023-05-22 19:24:27 +01:00
parent d8dcf1b8ea
commit 8ea934f5f8
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -215,6 +215,12 @@ export const renderPageContent = (
}
},
})
.use(rehypeRewrite, {
selector: "h1",
rewrite: (node: any) => {
node.tagName = "h2"
},
})
.use(rehypePrism, {
ignoreMissing: true,
showLineNumbers: true,