feat: automatically convert h1 to h2
This commit is contained in:
@@ -215,6 +215,12 @@ export const renderPageContent = (
|
||||
}
|
||||
},
|
||||
})
|
||||
.use(rehypeRewrite, {
|
||||
selector: "h1",
|
||||
rewrite: (node: any) => {
|
||||
node.tagName = "h2"
|
||||
},
|
||||
})
|
||||
.use(rehypePrism, {
|
||||
ignoreMissing: true,
|
||||
showLineNumbers: true,
|
||||
|
||||
Reference in New Issue
Block a user