diff --git a/astro.config.mjs b/astro.config.mjs index 603df88..3d3c4dc 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -176,7 +176,7 @@ export default defineConfig({ mdx({ rehypePlugins: [ rehypeHeadingIds, - rehypeRelativeAssets, + [rehypeRelativeAssets, { base: isGithubPages ? '/website' : '' }], ] }), react(), diff --git a/src/components/card.v2.tsx b/src/components/card.v2.tsx index 6dc57c1..2e94a1a 100644 --- a/src/components/card.v2.tsx +++ b/src/components/card.v2.tsx @@ -1,6 +1,8 @@ import type { ReactNode } from "react"; import {truncateStringToLength} from "../lib/utils.ts"; +const BASE = import.meta.env.BASE_URL; + export type CardTypeProps = { title: string; summary: string; @@ -14,7 +16,7 @@ export default function CardV2(props: CardTypeProps) {