feat: add rehype-external-links for external link security
This commit is contained in:
@@ -58,8 +58,12 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
|
|||||||
options={{
|
options={{
|
||||||
mdxOptions: {
|
mdxOptions: {
|
||||||
remarkPlugins: [smartypants, remarkMath, remarkGfm],
|
remarkPlugins: [smartypants, remarkMath, remarkGfm],
|
||||||
rehypePlugins: [
|
rehypePlugins: [
|
||||||
rehypeSlug,
|
rehypeSlug,
|
||||||
|
[rehypeExternalLinks, {
|
||||||
|
target: '_blank',
|
||||||
|
rel: ['nofollow', 'noopener', 'noreferrer'],
|
||||||
|
}],
|
||||||
rehypeAutolinkHeadings,
|
rehypeAutolinkHeadings,
|
||||||
[rehypePrettyCode, { theme: 'github-dark' }],
|
[rehypePrettyCode, { theme: 'github-dark' }],
|
||||||
rehypeKatex,
|
rehypeKatex,
|
||||||
|
|||||||
Reference in New Issue
Block a user