remove custom rehype highlight plugin

This commit is contained in:
2023-04-23 21:44:49 +00:00
parent dff82d018b
commit 7894cf8c81
4 changed files with 104 additions and 62 deletions

View File

@ -1,6 +1,7 @@
import { PropsWithChildren } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCalendar } from "@fortawesome/free-solid-svg-icons";
import { MDXProvider } from "@mdx-js/react";
import React, { PropsWithChildren } from "react";
import Base from "../pages/LayoutBase";
@ -11,6 +12,10 @@ interface BlogProps {
updated?: string;
}
const components = {
pre: (props: any) => <pre className="hljs" {...props} />,
};
export default function Layout({
title,
description,
@ -37,7 +42,7 @@ export default function Layout({
<Base>
{header}
<div style={{ paddingTop: "2em" }} />
{children}
<MDXProvider components={components}>{children}</MDXProvider>
</Base>
);
return withChildren;