@@ -1,4 +1,5 @@
1import React from "react";
1import React from "react";
2+import Link from "next/link";
2import Markdoc, { Ast, Node, Tag, Raw } from "@markdoc/markdoc";
3import Markdoc, { Ast, Node, Tag, Raw } from "@markdoc/markdoc";
3import { heading } from "./schema/Heading.markdoc";
4import { heading } from "./schema/Heading.markdoc";
4import { footnoteRef } from "./schema/footnoteRef.markdoc";
5import { footnoteRef } from "./schema/footnoteRef.markdoc";
@@ -126,6 +127,14 @@ const superscript = ({ children }) => <sup>{children}</sup>;
127const CustomFence = ({ children }) => <pre>{children}</pre>;
128const CustomFence = ({ children }) => <pre>{children}</pre>;
130+const NextLink = ({ href, target, children }) => {
132+ <Link href={href} passHref>
133+ <a target={target}>{children}</a>
129export function MarkdownParse({ post }) {
138export function MarkdownParse({ post }) {
130 const tokeniser = new Markdoc.Tokenizer({ html: true, linkify: true });
139 const tokeniser = new Markdoc.Tokenizer({ html: true, linkify: true });
131 const tokens = tokeniser.tokenize(post.content);
140 const tokens = tokeniser.tokenize(post.content);
@@ -150,6 +159,7 @@ export function MarkdownParse({ post }) {
150 customFence,
159 customFence,
151 RenderHtml,
160 RenderHtml,
152 superscript,
161 superscript,
@@ -164,6 +174,7 @@ export default function Markdown({ content }) {
165 CustomFence,
175 CustomFence,
166 RenderHtml,
176 RenderHtml,