feat: open mdx post urls in a new tab

This commit is contained in:
Barrett Ruth 2025-12-30 19:31:37 -06:00
parent 10cfafce65
commit 5036ae4654
3 changed files with 34 additions and 2 deletions

View file

@ -1,7 +1,8 @@
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import remarkMath from "remark-math";
import rehypeExternalLinks from "rehype-external-links";
import rehypeKatex from "rehype-katex";
import remarkMath from "remark-math";
import path from "path";
const midnight = {
@ -73,7 +74,16 @@ export default defineConfig({
integrations: [
mdx({
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
rehypePlugins: [
rehypeKatex,
[
rehypeExternalLinks,
{
target: "_blank",
rel: ["noopener", "noreferrer"],
},
],
],
}),
],
vite: {