fix: external links

This commit is contained in:
enscribe 2024-10-06 21:52:40 -07:00
parent e3e29ae66e
commit dc05cb25a6
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
5 changed files with 43 additions and 5 deletions

View file

@ -10,6 +10,7 @@ import {
} from '@shikijs/transformers'
import { defineConfig } from 'astro/config'
import rehypeKatex from 'rehype-katex'
import rehypeExternalLinks from 'rehype-external-links'
import rehypePrettyCode from 'rehype-pretty-code'
import remarkEmoji from 'remark-emoji'
import remarkMath from 'remark-math'
@ -33,6 +34,13 @@ export default defineConfig({
markdown: {
syntaxHighlight: false,
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow', 'noreferrer', 'noopener'],
},
],
rehypeHeadingIds,
rehypeKatex,
// @ts-expect-error