feat: automatically convert h1 to h2

This commit is contained in:
DIYgod
2023-05-22 19:24:27 +01:00
parent d8dcf1b8ea
commit 8ea934f5f8
+6
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,